2017-10-28 09:21:39 -07:00
|
|
|
<div id="assigned_user" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}">
|
|
|
|
|
|
|
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
|
|
|
|
2020-04-28 00:01:47 -07:00
|
|
|
<div class="col-md-6">
|
2020-03-31 23:36:56 -07:00
|
|
|
<select class="js-data-ajax" data-endpoint="departments" data-placeholder="{{ trans('general.select_department') }}" name="{{ $fieldname }}" style="width: 100%" id="department_select" aria-label="{{ $fieldname }}">
|
2020-04-21 03:58:31 -07:00
|
|
|
@if ($department_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
2020-04-02 18:17:21 -07:00
|
|
|
<option value="{{ $department_id }}" selected="selected" role="option" aria-selected="true" role="option">
|
2017-11-08 17:07:57 -08:00
|
|
|
{{ (\App\Models\Department::find($department_id)) ? \App\Models\Department::find($department_id)->name : '' }}
|
2017-10-28 09:21:39 -07:00
|
|
|
</option>
|
|
|
|
@else
|
2020-04-02 18:17:21 -07:00
|
|
|
<option value="" role="option">{{ trans('general.select_department') }}</option>
|
2017-10-28 09:21:39 -07:00
|
|
|
@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" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
2017-10-28 09:21:39 -07:00
|
|
|
|
|
|
|
</div>
|