mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Conditionally disable Add default values checkbox
This commit is contained in:
parent
10b45812c4
commit
7f3c86165b
|
@ -10,13 +10,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label class="form-control">
|
<label class="form-control">
|
||||||
{{ Form::checkbox('add_default_values', 1, old('add_default_values', $add_default_values), ['data-livewire-component' => $this->getId(), 'id' => 'add_default_values', 'wire:model.live' => 'add_default_values']) }}
|
{{ Form::checkbox('add_default_values', 1, old('add_default_values', $add_default_values), ['data-livewire-component' => $this->getId(), 'id' => 'add_default_values', 'wire:model.live' => 'add_default_values', 'disabled' => $this->fields->isEmpty()]) }}
|
||||||
{{ trans('admin/models/general.add_default_values') }}
|
{{ trans('admin/models/general.add_default_values') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if ($add_default_values ) {{-- 'if the checkbox is enabled *AND* there are more than 0 fields in the fieldsset' --}}
|
@if ($add_default_values )
|
||||||
@if ($this->fields)
|
@if ($this->fields)
|
||||||
|
|
||||||
@foreach ($this->fields as $field)
|
@foreach ($this->fields as $field)
|
||||||
|
|
Loading…
Reference in a new issue