Fix on static page Crud form showing wrong type

This commit is contained in:
Jérémy Munsch 2023-11-24 17:21:58 +01:00
parent 2fe883a121
commit 93ea0c0ca7
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -1,17 +1,18 @@
<div class="row">
{{-- ROLE --}}
{{-- TYPE --}}
<div class="col-12 col-md-6 mb-3">
<fieldset class="h-100 border p-3">
<legend>{{ Str::ucfirst(__('validation.custom.static_page_type')) }}</legend>
<div class="row">
<div class="col-12">
@include('bo.partials.inputs.tinyint-enum', [
'id' => 'userRole',
'label' => __('Associer un rôle'),
'name' => 'role',
@include('back::partials.inputs.tinyint-enum', [
'id' => 'staticPageType',
'label' => __('Type de page'),
'name' => 'type',
'model' => $staticPageModel ?? null,
'required' => false,
'disabled' => true,
'value' => optional(optional($staticPageModel ?? null)->type)->value(),
'associatedModels' => \App\Enums\StaticPageType::toArray(),
'helper' => '',
])