Merge remote-tracking branch 'origin/ticket930' into develop

This commit is contained in:
Vincent BRIDIER 2022-06-16 12:02:50 +02:00
commit 56aa2b2a2c
No known key found for this signature in database
GPG key ID: 8571BFA20420D512

View file

@ -16,29 +16,27 @@
<div class="card-body">
<form action="{{ CrudController::getRoutePrefixed("$modelTable.store") }}" method="POST" @if($hasFile) enctype="multipart/form-data" @endif>
@csrf
<table class="table table-sm table-bordered border-primary align-middle table-striped text-center">
<thead class="thead-dark">
<tr>
<th scope="col" class="w-25">{{ __('crud-policies::crud.property') }}</th>
<th scope="col" class="w-75">{{ __('crud-policies::crud.value') }}</th>
</tr>
</thead>
<tbody>
@foreach ($modelClass::getEditableProperties() as $fieldName => $prop)
@php
// create form cannot accept readonly field
$prop['readonly'] = false;
@endphp
@if(in_array(CrudAction::create(), $prop['actions']))
<tr>
<div class="container text-center">
<div class="row">
<div class="col-3 border border-secondary py-1 px-1">{{ __('crud-policies::crud.property') }}</div>
<div class="col-9 border border-secondary py-1 px-1">{{ __('crud-policies::crud.value') }}</div>
</div>
@foreach ($modelClass::getEditableProperties() as $fieldName => $prop)
@php
// create form cannot accept readonly field
$prop['readonly'] = false;
@endphp
@if(in_array(CrudAction::create(), $prop['actions']))
<div class="row">
@include('crud-policies::crud.formfield')
</tr>
@endif
@endforeach
</tbody>
</table>
<div class="col text-center">
<button class="btn btn-info" type="submit">{{ __('crud-policies::crud.create') }}</button>
</div>
@endif
@endforeach
<div class="row">
<div class="col text-center">
<button class="btn btn-info" type="submit">{{ __('crud-policies::crud.create') }}</button>
</div>
</div>
</div>
</form>
</div>