mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added more defaults for selected values
This commit is contained in:
parent
cd2816b1c7
commit
5d890fb139
|
@ -57,7 +57,7 @@
|
|||
@include ('partials.forms.edit.serial', ['translated_serial' => trans('admin/hardware/form.serial')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id'])
|
||||
@include ('partials.forms.edit.order_number')
|
||||
<?php
|
||||
$currency_type=null;
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
<select class="js-data-ajax" data-endpoint="companies" name="{{ $fieldname }}" style="width: 100%" id="company_select">
|
||||
@if ($company_id = Input::old($fieldname, $item->{$fieldname}))
|
||||
<option value="{{ $company_id }}" selected="selected">
|
||||
{{ \App\Models\Company::find($company_id)->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="">{{ trans('general.select_model') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
|
||||
<select class="js-data-ajax" data-endpoint="locations" name="{{ $fieldname }}" style="width: 100%" id="{{ $fieldname }}_location_select">
|
||||
@if ($location_id = Input::old($fieldname, $item->{$fieldname}))
|
||||
<option value="{{ $location_id }}" selected="selected">
|
||||
{{ \App\Models\Location::find($location_id)->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="">{{ trans('general.select_location') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
|
||||
<div class="col-md-7 required">
|
||||
<select class="js-data-ajax" data-endpoint="users" name="{{ $fieldname }}" style="width: 100%" id="assigned_user_select">
|
||||
@if ($user_id = Input::old($fieldname, $item->{$fieldname}))
|
||||
<option value="{{ $user_id }}" selected="selected">
|
||||
{{ \App\Models\User::find($user_id)->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="">{{ trans('general.select_user') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue