mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Check that the company is valid in select ajax
This commit is contained in:
parent
9097681c13
commit
b36594f508
|
@ -5,7 +5,7 @@
|
|||
<select class="js-data-ajax" data-endpoint="companies" name="{{ $fieldname }}" style="width: 100%" id="company_select">
|
||||
@if ($company_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
<option value="{{ $company_id }}" selected="selected">
|
||||
{{ \App\Models\Company::find($company_id)->name }}
|
||||
{{ (\App\Models\Company::find($company_id)) ? \App\Models\Company::find($company_id)->name : '' }}
|
||||
</option>
|
||||
@else
|
||||
<option value="">{{ trans('general.select_company') }}</option>
|
||||
|
|
Loading…
Reference in a new issue