mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -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">
|
<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} : ''))
|
@if ($company_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||||
<option value="{{ $company_id }}" selected="selected">
|
<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>
|
</option>
|
||||||
@else
|
@else
|
||||||
<option value="">{{ trans('general.select_company') }}</option>
|
<option value="">{{ trans('general.select_company') }}</option>
|
||||||
|
|
Loading…
Reference in a new issue