krgm.so-manager-dev.com/resources/views/admin/print_areas/_form.blade.php
kin.rinzen 7913f58d19
All checks were successful
Deploy main / deploy (push) Successful in 22s
画面表示とレイアウト修正
2025-09-05 17:49:01 +09:00

83 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.

@if(Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('success') }}
</div>
@elseif(Session::has('error'))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{ __('誤差') }}:</h4>
{!! Session::get('error') !!}
</div>
@elseif(isset($errorMsg))
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> {{ __('誤差') }}:</h4>
{!! $errorMsg !!}
</div>
@endif
<div class="card p-4">
<div class="row mb-3">
@if($isInfo || $isEdit)
<label class="col-md-2 col-form-label">{{ __('validation.attributes.print_area_id') }}</label>
<div class="col-md-10">
<input type="text" class="form-control" value="{{ $record->print_area_id ?? '' }}" readonly>
</div>
@endif
</div>
<div class="row mb-3">
<label class="col-md-2 col-form-label">
{{ __('validation.attributes.print_area_name') }}
@if(!$isInfo)<span class="text-danger">*</span>@endif
</label>
<div class="col-md-10">
<input type="text" name="print_area_name" class="form-control"
value="{{ old('print_area_name', $record->print_area_name ?? '') }}"
placeholder="{{ __('validation.attributes.print_area_name') }}"
@if($isInfo) readonly @endif>
</div>
</div>
<div class="row mb-3">
<label class="col-md-2 col-form-label">
{{ __('validation.attributes.park_name') }}
@if(!$isInfo)<span class="text-danger">*</span>@endif
</label>
<div class="col-md-10">
<select name="park_id" class="form-control" @if($isInfo) disabled @endif>
<option value="">{{ __('validation.attributes.park_name') }}</option>
@foreach($parks as $key => $val)
<option value="{{ $key }}" @if(($record->park_id ?? '') == $key) selected @endif>{{ $val }}</option>
@endforeach
</select>
</div>
</div>
{{-- 下部登録ボタン --}}
<div class="text-left mt-4">
@if($isInfo)
{{-- 詳細モードinfoでは、編集ボタンを表示 --}}
<a href="{{ route('print_areas_add') }}" class="btn btn-lg btn-success">{{ __('登録') }}</a>
<a href="{{ route('print_areas_edit', ['id' => $record->print_area_id]) }}" class="btn btn-danger px-5">{{ __('編集') }}</a>
@else
{{-- 登録 or 更新 --}}
<button type="submit" class="btn btn-lg btn-success">
{{ $isEdit ? '登録' : '登録' }}
</button>
{{-- 削除ボタン --}}
@if($isEdit)
<a href="{{ route('print_areas_delete', ['id' => $record->print_area_id]) }}"
class="btn btn-lg btn-danger ml-3"
onclick="return confirm('削除してよろしいですか?')">
削除
</a>
@endif
@endif
</div>
</div>