221 lines
11 KiB
PHP
221 lines
11 KiB
PHP
<div class="row">
|
|
{{-- 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' => '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' => '',
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.title')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'userFirstname',
|
|
'label' => __('Titre de la :model', ['model' => trans_choice('models.classes.static_page', 1)]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'title',
|
|
'required' => true,
|
|
'model' => $staticPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __('titre de la :model', ['model' => trans_choice('models.classes.static_page', 1)]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('Un titre clair et concis'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- SEO_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.seo_title')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'staticPageSeoTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.seo_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'seo_title',
|
|
'required' => true,
|
|
'model' => $staticPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.seo_title'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'min' => 45,
|
|
'max' => 70,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.seo_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- SEO_DESCRIPTION --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.seo_description')) }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-multiline', [
|
|
'id' => 'staticPageSeoDescription',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.seo_description')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'name' => 'seo_description',
|
|
'model' => $staticPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.seo_description'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'min' => 50,
|
|
'max' => 160,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.seo_description')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
@if ($staticPageModel->type->containsContent())
|
|
{{-- CONTENT --}}
|
|
<div class="col-12 mb-3">
|
|
<fieldset class="border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.attributes.content')) }}</legend>
|
|
<div class="row mb-3">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'staticPageContent',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.content')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'name' => 'content',
|
|
'model' => $staticPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
@endif
|
|
{{-- PICTURE --}}
|
|
@if ($staticPageModel->type->containsBanner())
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.banner')) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PICTURE_ALT --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'staticPagePictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.alt_attribute')),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.banner'),
|
|
'inter2' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => true,
|
|
'model' => $staticPageModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.alt_attribute')),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.banner'),
|
|
'inter2' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'staticPagePictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.title_attribute')),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.banner'),
|
|
'inter2' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => true,
|
|
'model' => $staticPageModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.title_attribute')),
|
|
'inter1' => __('validation.custom.of_the.female'),
|
|
'field2' => __('validation.custom.banner'),
|
|
'inter2' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.static_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'staticPagePicture',
|
|
'name' => 'picture',
|
|
'width' => 1920,
|
|
'height' => 1080,
|
|
'model' => $staticPageModel ?? null,
|
|
'helper' => __('crud.minicrud.dimensions_must_be', [
|
|
'widthpx' => '1920px',
|
|
'heightpx' => '1080px',
|
|
]),
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
@endif
|
|
<div class="col-12 text-center">
|
|
<p><b>{{ __('* Champs obligatoires') }}</b></p>
|
|
</div>
|
|
</div>
|