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