2017-10-26 16:37:41 -07:00
|
|
|
<!-- Company -->
|
|
|
|
<div id="{{ $fieldname }}" class="form-group{{ $errors->has($fieldname) ? ' has-error' : '' }}">
|
|
|
|
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
|
|
|
<div class="col-md-7">
|
2020-03-31 23:36:56 -07:00
|
|
|
<select class="js-data-ajax" data-endpoint="companies" data-placeholder="{{ trans('general.select_company') }}" name="{{ $fieldname }}" style="width: 100%" id="company_select" aria-label="{{ $fieldname }}">
|
2017-10-28 09:21:39 -07:00
|
|
|
@if ($company_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
2017-10-28 08:38:19 -07:00
|
|
|
<option value="{{ $company_id }}" selected="selected">
|
2017-11-08 17:01:46 -08:00
|
|
|
{{ (\App\Models\Company::find($company_id)) ? \App\Models\Company::find($company_id)->name : '' }}
|
2017-10-28 08:38:19 -07:00
|
|
|
</option>
|
|
|
|
@else
|
2017-10-28 09:21:39 -07:00
|
|
|
<option value="">{{ trans('general.select_company') }}</option>
|
2017-10-28 08:38:19 -07:00
|
|
|
@endif
|
2017-10-26 16:37:41 -07:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2020-04-01 00:18:20 -07:00
|
|
|
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
2017-10-26 16:37:41 -07:00
|
|
|
|
|
|
|
</div>
|