146 lines
6.9 KiB
PHP
146 lines
6.9 KiB
PHP
<div class="row">
|
|
{{-- 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' => 'commitmentTitle',
|
|
'label' => __(':field :inter:model', [
|
|
'field' => Str::ucfirst(__('validation.attributes.title')),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'title',
|
|
'required' => true,
|
|
'model' => $commitmentModel ?? null,
|
|
'helper' => __('validation.between.string', [
|
|
'attribute' => __(':field :inter:model', [
|
|
'field' => __('validation.attributes.title'),
|
|
'inter' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
'min' => 3,
|
|
'max' => 255,
|
|
]),
|
|
'placeholder' => __('crud.placeholders.beautiful', ['field' => __('validation.attributes.title')]),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
{{-- STATUS --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ __('crud.minicrud.visibility_label') }}</legend>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.tinyint-boolean', [
|
|
'id' => 'commitmentStatus',
|
|
'name' => 'published',
|
|
'model' => $commitmentModel ?? null,
|
|
'label' => __('crud.minicrud.visibility_label'),
|
|
'helper' => sprintf('%s', __('crud.minicrud.visibility_helper')),
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
{{-- PICTURE --}}
|
|
<div class="col-12 pb-3">
|
|
<fieldset class="h-100 border p-3">
|
|
<legend>{{ Str::ucfirst(__('validation.custom.picture')) }}</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' => 'commitmentPictureAlt',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_alt',
|
|
'required' => true,
|
|
'model' => $commitmentModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_alt_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_alt')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE_TITLE --}}
|
|
<div class="col-12 col-md-6 mb-3">
|
|
@include('bo.partials.inputs.varchar', [
|
|
'id' => 'commitmentPictureTitle',
|
|
'label' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
'hasWordCounter' => true,
|
|
'name' => 'picture_title',
|
|
'required' => true,
|
|
'model' => $commitmentModel ?? null,
|
|
'helper' => __('crud.minicrud.picture_title_helper'),
|
|
'placeholder' => __(':field1 :inter1:field2 :inter2:model', [
|
|
'field1' => Str::ucfirst(__('validation.custom.attribute_title')),
|
|
'inter1' => __('validation.custom.of_the.vowel'),
|
|
'field2' => __('validation.custom.picture'),
|
|
'inter2' => __('validation.custom.of_the.vowel'),
|
|
'model' => __('models.classes.commitment'),
|
|
]),
|
|
])
|
|
</div>
|
|
{{-- PICTURE --}}
|
|
<div class="col-12">
|
|
@include('bo.partials.inputs.varchar-picture', [
|
|
'id' => 'commitmentPicture',
|
|
'name' => 'picture',
|
|
'width' => 185,
|
|
'height' => 185,
|
|
'model' => $commitmentModel ?? null,
|
|
'helper' => __('crud.minicrud.dimensions_must_be', [
|
|
'widthpx' => '185px',
|
|
'heightpx' => '185px',
|
|
]),
|
|
'required' => true,
|
|
'preview' => true,
|
|
])
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col text-center">
|
|
<p><b>* {{ __('crud.helpers.required_fields') }}</b></p>
|
|
</div>
|
|
</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
|