mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 05:47:28 -08:00
Fixed #8753 - create-asset-from-model did not preselect the model
This commit is contained in:
parent
551e28eec9
commit
57d6a7d35e
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="col-md-7{{ ((isset($field_req)) || ((isset($required) && ($required =='true')))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}"{!! (isset($field_req) ? ' data-validation="required" required' : '') !!}>
|
||||
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
|
||||
@if ($model_id = old($fieldname, ($item->{$fieldname} ?? request($fieldname) ?? '')))
|
||||
<option value="{{ $model_id }}" selected="selected">
|
||||
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
|
||||
</option>
|
||||
|
|
Loading…
Reference in a new issue