2019-02-19 11:19:00 -08:00
|
|
|
<!-- Accessory -->
|
|
|
|
<div id="assigned_accessory" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}"{!! (isset($style)) ? ' style="'.e($style).'"' : '' !!}>
|
|
|
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
|
|
|
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
|
|
|
<select class="js-data-ajax select2" data-endpoint="accessories" data-placeholder="{{ trans('general.select_accessory') }}" name="{{ $fieldname }}" style="width: 100%" id="{{ (isset($select_id)) ? $select_id : 'assigned_accessory_select' }}"{{ (isset($multiple)) ? ' multiple' : '' }}>
|
|
|
|
|
2019-12-10 19:32:50 -08:00
|
|
|
@if ((!isset($unselect)) && ($accessory_id = Request::old($fieldname, (isset($accessory) ? $accessory->id : (isset($item) ? $item->{$fieldname} : '')))))
|
2019-02-19 11:19:00 -08:00
|
|
|
<option value="{{ $accessory_id }}" selected="selected">
|
2019-02-27 14:37:58 -08:00
|
|
|
{{ (\App\Models\Accessory::find($accessory_id)) ? \App\Models\Accessory::find($accessory_id)->present()->name : '' }}
|
2019-02-19 11:19:00 -08:00
|
|
|
</option>
|
|
|
|
@else
|
|
|
|
@if(!isset($multiple))
|
|
|
|
<option value="">{{ trans('general.select_accessory') }}</option>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
</select>
|
|
|
|
</div>
|
2021-09-26 01:11:08 -07:00
|
|
|
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
2019-02-19 11:19:00 -08:00
|
|
|
|
|
|
|
</div>
|