krgm.so-manager-dev.com/resources/views/admin/parking_regulations/_form.blade.php
OU.ZAIKOU 041bef0546
All checks were successful
Deploy main / deploy (push) Successful in 22s
【駐輪規定マスタ】初版作成
2026-02-02 00:40:00 +09:00

89 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@php
// $psections: 車種区分コレクション
// $ptypes: 駐輪分類コレクション
// $parkId: 駐輪場ID
// $record: 編集用レコードnull = 新規)
$selectedPsection = old('psection_id', $record->psection_id ?? null);
$selectedPtype = old('ptype_id', $record->ptype_id ?? null);
$regulationsText = old('regulations_text', $record->regulations_text ?? '');
@endphp
<input type="hidden" name="park_id" value="{{ $parkId }}">
<input type="hidden" name="park_id" value="{{ $parkId }}">
{{-- 駐輪場名(編集不可) --}}
<div class="mb-3 row">
<label class="col-md-2 col-form-label font-weight-bold">駐輪場名</label>
<div class="col-md-10">
<input type="text"
class="form-control"
value="{{ $park->park_name }}"
readonly>
</div>
</div>
{{-- 車種区分 --}}
<div class="mb-3 row">
<label class="col-md-2 col-form-label font-weight-bold">車種区分 <span class="text-danger">*</span></label>
<div class="col-md-10">
<select name="psection_id" class="form-control" required>
<option value="">選択してください</option>
@foreach($psections as $ps)
<option value="{{ $ps->psection_id }}"
@selected($selectedPsection == $ps->psection_id)>
{{ $ps->psection_subject }}
</option>
@endforeach
</select>
</div>
</div>
{{-- 駐輪分類 --}}
<div class="mb-3 row">
<label class="col-md-2 col-form-label font-weight-bold">駐輪分類 <span class="text-danger">*</span></label>
<div class="col-md-10">
<select name="ptype_id" class="form-control" required>
<option value="">選択してください</option>
@foreach($ptypes as $pt)
<option value="{{ $pt->ptype_id }}"
@selected($selectedPtype == $pt->ptype_id)>
{{ $pt->ptype_subject }}
</option>
@endforeach
</select>
</div>
</div>
{{-- 駐輪規定 --}}
<div class="mb-3 row">
<label class="col-md-2 col-form-label font-weight-bold">
駐輪規定 <span class="text-danger">*</span>
</label>
<div class="col-md-10">
<textarea name="regulations_text"
class="form-control js-summernote"
required>{!! $regulationsText !!}</textarea>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
$('.js-summernote').summernote({
height: 420,
minHeight: 420,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'italic', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture']],
['view', ['fullscreen', 'codeview', 'help']]
]
});
});
</script>