255 lines
13 KiB
PHP
255 lines
13 KiB
PHP
<div class="row">
|
|
{{-- PICTOS --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::of(__('models.classes.picto'))->plural()->ucfirst() }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.pivot-belongsToMany', [
|
|
'id' => 'commitmentPagePictos',
|
|
'name' => 'pictos',
|
|
'required' => false,
|
|
'model' => $commitmentPageModel ?? null,
|
|
'itemsList' => $pictoModels ?? null,
|
|
'itemLimit' => [0, 2],
|
|
'placeholder' => 'Rechercher un pictogramme',
|
|
'helper' => __('Séléctionnez le ou les :model1 à associer à la :model2 (minimum :min, maximum :max)', [
|
|
'model1' => Str::plural(__('models.classes.picto')),
|
|
'model2' => trans_choice('models.classes.commitment_page', 1),
|
|
'min' => 0,
|
|
'max' => 2,
|
|
]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- QUALITY --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::title(__('validation.custom.quality_section')) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- QUALITY_TITLE --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'commitmentPageQualityTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.quality_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'quality_title',
|
|
'required' => true,
|
|
'model' => $commitmentPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.quality_title'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.quality_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- QUALITY_TEXT --}}
|
|
<div class="col-12 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'commitmentPageQualityText',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.quality_text')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'name' => 'quality_text',
|
|
'model' => $commitmentPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PRODUCT1 --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::title(__('validation.custom.productx_section', ['x' => 1])) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PRODUCT1_TITLE --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'commitmentPageProduct1Title',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_title', ['x' => 1])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'product1_title',
|
|
'required' => true,
|
|
'model' => $commitmentPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.productx_title', ['x' => 1]),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_title', ['x' => 1])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PRODUCT1_TEXT --}}
|
|
<div class="col-12 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'commitmentPageProduct1Text',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_text', ['x' => 1])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'name' => 'product1_text',
|
|
'model' => $commitmentPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- PRODUCT2 --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::title(__('validation.custom.productx_section', ['x' => 2])) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- PRODUCT2_TITLE --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'commitmentPageProduct2Title',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_title', ['x' => 2])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'product2_title',
|
|
'required' => true,
|
|
'model' => $commitmentPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.productx_title', ['x' => 2]),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_title', ['x' => 2])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PRODUCT2_TEXT --}}
|
|
<div class="col-12 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'commitmentPageProduct2Text',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.productx_text', ['x' => 2])),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'name' => 'product2_text',
|
|
'model' => $commitmentPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- ENVIRONMENT --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::title(__('validation.custom.environment_section')) }}</legend>
|
|
<div class="row mb-3">
|
|
{{-- ENVIRONMENT_TITLE --}}
|
|
<div class="col-12 col-md-6 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'commitmentPageEnvironmentTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.environment_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'environment_title',
|
|
'required' => true,
|
|
'model' => $commitmentPageModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.custom.environment_title'),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.environment_title')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- ENVIRONMENT_TEXT --}}
|
|
<div class="col-12 m-md-0 mb-3">
|
|
@include('bo.partials.inputs.text-html', [
|
|
'id' => 'commitmentPageEnvironmentText',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.custom.environment_text')),
|
|
'inter' => __('validation.custom.of_the.female'),
|
|
'model' => trans_choice('models.classes.commitment_page', 1),
|
|
]),
|
|
'name' => 'environment_text',
|
|
'model' => $commitmentPageModel ?? null,
|
|
'required' => true,
|
|
'helper' => __('crud.minicrud.text_warning'),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col text-center">
|
|
<p><b>* {{ __('crud.helpers.required_fields') }}</b></p>
|
|
</div>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script nonce="{{ $nonce }}">
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
// Submit button clone.
|
|
const submit = document.getElementById('formSubmit')
|
|
submitClone = document.getElementById('formSubmitClone');
|
|
submitClone.addEventListener('click', (event) => {
|
|
event.preventDefault();
|
|
submit.click('');
|
|
})
|
|
});
|
|
</script>
|
|
@endpush
|