75 lines
2.6 KiB
PHP
75 lines
2.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', '市区マスタ編集')
|
|
|
|
@section('content')
|
|
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h3 class="mb-0">編集</h3>
|
|
<ol class="breadcrumb float-sm-right text-sm mb-0" style="background: #f8f9fa;">
|
|
<li class="breadcrumb-item"><a href="{{ url('/home') }}">ホーム</a></li>
|
|
<li class="breadcrumb-item"><a href="{{ route('city') }}">市区マスタ</a></li>
|
|
<li class="breadcrumb-item active">編集</li>
|
|
</ol>
|
|
</div>
|
|
|
|
@includeIf('common.flash')
|
|
|
|
<div class="card shadow mb-4">
|
|
<div class="card-body">
|
|
<form method="POST" action="{{ route('city_edit', ['id' => $city->city_id]) }}" enctype="multipart/form-data">
|
|
@csrf
|
|
@method('POST')
|
|
|
|
@include('admin.CityMaster._form', [
|
|
'isEdit' => 1,
|
|
'isInfo' => 0,
|
|
'city' => $city,
|
|
])
|
|
|
|
<div class="mt-3">
|
|
<button type="button" class="btn btn-default register">登録</button>
|
|
<a href="{{ route('city') }}" class="btn btn-default">戻る</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|
|
@push('scripts')
|
|
<script>
|
|
(function ($) {
|
|
$(function () {
|
|
var $form = $('form[action="{{ route('city_edit', ['id' => $city->city_id]) }}"]');
|
|
$('.register').off('click.cityConfirm').on('click.cityConfirm', function (e) {
|
|
e.preventDefault();
|
|
if (!$form.length) { return; }
|
|
var submit = function () {
|
|
if (typeof $form[0].requestSubmit === 'function') {
|
|
$form[0].requestSubmit();
|
|
} else {
|
|
$form.trigger('submit');
|
|
}
|
|
};
|
|
if ($.confirm) {
|
|
$.confirm({
|
|
title: '確認ダイアログ',
|
|
content: '登録してよろしいですか? はい/いいえ',
|
|
buttons: {
|
|
ok: { text: 'はい', btnClass: 'btn-primary', action: submit },
|
|
いいえ: function () {}
|
|
}
|
|
});
|
|
} else if (window.confirm('登録してよろしいですか?')) {
|
|
submit();
|
|
}
|
|
});
|
|
});
|
|
})(window.jQuery);
|
|
</script>
|
|
@endpush
|