620 lines
33 KiB
PHP
620 lines
33 KiB
PHP
<div class="row">
|
|
{{-- TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.attributes.title'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.attributes.title'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'title',
|
|
'required' => true,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.attributes.title'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.attributes.title'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- SUBTITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.subtitle'))->ucFirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideSubtitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.subtitle'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'subtitle',
|
|
'required' => true,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.subtitle'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.subtitle'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- COLOR --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
<fieldset class="border p-3">
|
|
<legend>{{ str(__('validation.custom.color_block'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'mainSlideBlockColor',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.color_block'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'value' => '#0f437e',
|
|
'name' => 'color_block',
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- BACKGROUND --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.background'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- BACKGROUND_ALT --}}
|
|
<div class="col-12 col-lg-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideBackgroundAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.background'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'background_alt',
|
|
'required' => true,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.background'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BACKGROUND_TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideBackgroundTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.background'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'background_title',
|
|
'required' => true,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.background'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BACKGROUND --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'mainSlideBackground',
|
|
'name' => 'background',
|
|
'width' => 1440,
|
|
'height' => 700,
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.attributes.image'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PICTURE_ALT --}}
|
|
<div class="col-12 col-lg-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlidePictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_alt'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-lg-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlidePictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => str(__('validation.custom.attribute_title'))->ucFirst(),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.attributes.image'),
|
|
'inter2' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'mainSlidePicture',
|
|
'name' => 'picture',
|
|
'width' => 200,
|
|
'height' => 300,
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => false,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- BUTTON N°1 --}}
|
|
<div class="col-12 col-lg-6 checkBtnStatus needButton1StatusTrue mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.button') . ' n°1')->ucFirst() }}</legend>
|
|
<div class="row">
|
|
{{-- BUTTON STATUS N°1 --}}
|
|
<div class="col-12 col-xxl-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlideButton1Status',
|
|
'name' => 'button_1_status',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => __(':field1 :inter:field2', [
|
|
'field1' => __('crud.minicrud.visibility_label'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'field2' => __('validation.custom.button'),
|
|
]),
|
|
'helper' => str(__('crud.minicrud.visibility_helper'))->ucFirst(),
|
|
])
|
|
</div>
|
|
{{-- BUTTON TARGET N°1 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlideButton1Target',
|
|
'name' => 'button_1_target',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => str(__('validation.custom.button_target') . ' n°1')->ucFirst(),
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => __('validation.custom.button_target') . ' n°1',
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BUTTON N°1 TEXT COLOR --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'mainSlideButton1TextColor',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_color_text') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'value' => '#0f437e',
|
|
'name' => 'button_1_color_text',
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
{{-- BUTTON N°1 BACKGROUND COLOR --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'mainSlideButton1BackgroundColor',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_color_background') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'value' => '#0f437e',
|
|
'name' => 'button_1_color_background',
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
{{-- BUTTON TEXT N°1 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideButton1Text',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_text') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'button_1_text',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.button') . ' n°1',
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_text') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BUTTON URL N°1 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideButton1Url',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_url') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'button_1_url',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.button_url') . ' n°1',
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_url') . ' n°1')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- BUTTON N°2 --}}
|
|
<div class="col-12 col-lg-6 checkBtnStatus needButton2StatusTrue mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.button') . ' n°2')->ucFirst() }}</legend>
|
|
<div class="row">
|
|
{{-- BUTTON STATUS N°2 --}}
|
|
<div class="col-12 col-xxl-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlideButton2Status',
|
|
'name' => 'button_2_status',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => __(':field1 :inter:field2', [
|
|
'field1' => __('crud.minicrud.visibility_label'),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'field2' => __('validation.custom.button'),
|
|
]),
|
|
'helper' => str(__('crud.minicrud.visibility_helper'))->ucFirst(),
|
|
])
|
|
</div>
|
|
{{-- BUTTON TARGET N°2 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlideButton2Target',
|
|
'name' => 'button_2_target',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => str(__('validation.custom.button_target') . ' n°2')->ucFirst(),
|
|
'helper' => __('validation.boolean', [
|
|
'attribute' => __('validation.custom.button_target') . ' n°2',
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BUTTON N°2 TEXT COLOR --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'mainSlideButton2TextColor',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_color_text') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'value' => '#0f437e',
|
|
'name' => 'button_2_color_text',
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
{{-- BUTTON N°2 BACKGROUND COLOR --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none">
|
|
@include('bo.partials.inputs.int-color', [
|
|
'id' => 'mainSlideButton2BackgroundColor',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_color_background') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'value' => '#0f437e',
|
|
'name' => 'button_2_color_background',
|
|
'model' => $mainSlideModel ?? null,
|
|
'required' => true,
|
|
'disabled' => false,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
{{-- BUTTON TEXT N°2 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideButton2Text',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_text') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'button_2_text',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.button') . ' n°2',
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_text') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- BUTTON URL N°2 --}}
|
|
<div class="col-12 col-xxl-6 need-button-status-true-fields d-none mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'mainSlideButton2Url',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_url') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'button_2_url',
|
|
'required' => false,
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.button_url') . ' n°2',
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => str(__('validation.custom.button_url') . ' n°2')->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.male'),
|
|
'model' => __('models.classes.main_slide'),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- IS_NEW/DEMARCHE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('validation.custom.status'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- IS_NEW --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlideIsNew',
|
|
'name' => 'new',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => str(__('validation.custom.new'))->ucFirst(),
|
|
'helper' => __(':text :inter:text2.', [
|
|
'text' => str(__('cocher pour afficher l\'étiquette'))->ucFirst(),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'text2' => __('nouveauté'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- DEMARCHE --}}
|
|
<div class="col-12 col-md-6">
|
|
@include('bo.partials.inputs.search-belongs-to-dropdown', [
|
|
'id' => 'mainSlideDemarche',
|
|
'label' => __(':model associée', [
|
|
'model' => str(__('validation.custom.demarche'))->ucFirst(),
|
|
]),
|
|
'name' => 'approach_id',
|
|
'relation' => 'approach',
|
|
'model' => $mainSlideModel,
|
|
'targetClass' => 'App\Models\Approach',
|
|
'modelListPaginate' => $demarcheModels ?? [],
|
|
'routeName' => 'bo.approaches.json-paginate',
|
|
'multiple' => false,
|
|
'fieldName' => 'name',
|
|
'required' => false,
|
|
'disabled' => false,
|
|
'placeholder' => __('Rechercher une :model', [
|
|
'model' => __('validation.custom.demarche'),
|
|
]),
|
|
'helper' => __(
|
|
'Sélectionner une :model qui sera associée parmis la liste (une seul et unique :model doit être choisi).',
|
|
['model' => __('validation.custom.demarche')]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PUBLICATION --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ str(__('crud.minicrud.visibility_label'))->ucFirst() }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PUBLISHED --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'mainSlidePublished',
|
|
'name' => 'published',
|
|
'model' => $mainSlideModel ?? null,
|
|
'label' => __('crud.minicrud.visibility_label'),
|
|
'helper' => sprintf(
|
|
'%s %s',
|
|
__('crud.minicrud.visibility_helper'),
|
|
__('crud.helpers.visibility_with_dates')),
|
|
])
|
|
</div>
|
|
{{-- PUBLICATION DATES --}}
|
|
<div class="col-12 mb-3">
|
|
<div class="row mb-3">
|
|
{{-- PUBLISHED_AT --}}
|
|
<div class="col">
|
|
<div class="form-group">
|
|
@include('bo.partials.inputs.timestamp-datetime', [
|
|
'label' =>
|
|
str(__('validation.custom.published_at'))->ucFirst() .
|
|
__(' (Europe/Paris)'),
|
|
'id' => 'mainSlidePublishedAt',
|
|
'name' => 'published_at',
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.helpers.published_at', [
|
|
'model' => str(__('models.classes.main_slide'))->ucFirst(),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
{{-- UNPUBLISHED_AT --}}
|
|
<div class="col">
|
|
<div class="form-group">
|
|
@include('bo.partials.inputs.timestamp-datetime', [
|
|
'label' =>
|
|
str(__('validation.custom.unpublished_at'))->ucfirst() .
|
|
__(' (Europe/Paris)'),
|
|
'id' => 'mainSlideUnPublishedAt',
|
|
'name' => 'unpublished_at',
|
|
'model' => $mainSlideModel ?? null,
|
|
'helper' => __('crud.helpers.unpublished_at', [
|
|
'model' => str(__('models.classes.main_slide'))->ucFirst(),
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
<div class="col-12 text-center">
|
|
<p><b>{{ __('* Champs obligatoires') }}</b></p>
|
|
</div>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script nonce="{{ $nonce }}">
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
document.querySelectorAll('.checkBtnStatus').forEach((element, index) => {
|
|
const button = document.getElementById('mainSlideButton' + (index + 1) + 'Status');
|
|
const needButtonStatusTrue = document.querySelector('.needButton' + (index + 1) + 'StatusTrue');
|
|
button.checked ? checkButtonStatus(needButtonStatusTrue) : '';
|
|
button.addEventListener("change", () => {
|
|
checkButtonStatus(needButtonStatusTrue);
|
|
});
|
|
});
|
|
|
|
function checkButtonStatus(node) {
|
|
node.classList.toggle('col-lg-6');
|
|
node.querySelectorAll('.need-button-status-true-fields').forEach(element => {
|
|
element.classList.toggle('d-none')
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
@endpush
|