2021-03-18 16:12:39 -07:00
|
|
|
<div>
|
2021-06-28 22:40:18 -07:00
|
|
|
<div class="form-group{{ $errors->has('custom_fieldset') ? ' has-error' : '' }}">
|
2021-03-18 16:12:39 -07:00
|
|
|
<label for="custom_fieldset" class="col-md-3 control-label">{{ trans('admin/models/general.fieldset') }}</label>
|
2021-06-28 22:40:18 -07:00
|
|
|
<div class="col-md-9">
|
2021-03-18 16:12:39 -07:00
|
|
|
{{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),old('custom_fieldset', 0000 /*$item->fieldset_id*/), array('class'=>'select2 js-fieldset-field', 'style'=>'width:350px', 'aria-label'=>'custom_fieldset', 'wire:model' => 'fieldset_id')) }}
|
|
|
|
{!! $errors->first('custom_fieldset', '<span class="alert-msg" aria-hidden="true"><br><i class="fa fa-times"></i> :message</span>') !!}
|
|
|
|
<label class="m-l-xs">
|
|
|
|
{{-- {{ Form::checkbox('add_default_values', 1, Request::old('add_default_values'), ['class' => 'js-default-values-toggler']) }} --}}
|
|
|
|
{{-- I'm not sure that *this* checkboxy thing will render right, because of things. It's not *in* its own view, right? So that's a problem --}}
|
|
|
|
<input wire:click="foo" wire:model="add_default_values" type='checkbox' name='add_default_values' value='1' class='js-default-values-toggler'{{ Request::old('add_default_values')? " checked='checked'" : "" }} />
|
|
|
|
{{ trans('admin/models/general.add_default_values') }}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@if($this->add_default_values) {{-- 'if the checkbox is enabled *AND* there are more than 0 fields in the fieldsset' --}}
|
|
|
|
<div>
|
|
|
|
<div class="form-group">
|
2021-03-23 14:24:00 -07:00
|
|
|
@livewire('custom-fields-for-fieldset',['fieldset_id' => $fieldset_id])
|
2021-03-18 16:12:39 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|