new: show active/inactive status toggle on offer edit form
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-2">
|
||||||
@include('components.form.input', [
|
@include('components.form.input', [
|
||||||
'name' => 'weight',
|
'name' => 'weight',
|
||||||
'value' => $offer['weight'] ?? null,
|
'value' => $offer['weight'] ?? null,
|
||||||
@@ -81,6 +81,15 @@
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
<input type="hidden" name="status_id" value="0">
|
||||||
|
@include('components.form.toggle', [
|
||||||
|
'name' => 'status_id',
|
||||||
|
'value' => $offer['status_id'] ?? 0,
|
||||||
|
'label' => 'Actif',
|
||||||
|
'size' => 'md',
|
||||||
|
])
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@component('components.card', ['title' => 'Disponibilité', 'class' => 'mt-5'])
|
@component('components.card', ['title' => 'Disponibilité', 'class' => 'mt-5'])
|
||||||
@@ -143,6 +152,8 @@
|
|||||||
initChevron();
|
initChevron();
|
||||||
initSaveForm('#offer-form');
|
initSaveForm('#offer-form');
|
||||||
initSelect2();
|
initSelect2();
|
||||||
|
$('#status_id').bootstrapToggle();
|
||||||
|
|
||||||
function updateEditLink(selectId, linkId, routeTemplate) {
|
function updateEditLink(selectId, linkId, routeTemplate) {
|
||||||
var val = $('#' + selectId).val();
|
var val = $('#' + selectId).val();
|
||||||
var $link = $('#' + linkId);
|
var $link = $('#' + linkId);
|
||||||
|
|||||||
Reference in New Issue
Block a user