mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge 2a156776a4
into 64f49afce1
This commit is contained in:
commit
c558dc49bb
25
resources/views/blade/input/select.blade.php
Normal file
25
resources/views/blade/input/select.blade.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
@props([
|
||||
// <options> can either be provided as key => value pairs
|
||||
// or passed in via the default $slot
|
||||
'options',
|
||||
'selected' => null,
|
||||
'includeEmpty' => false,
|
||||
'forLivewire' => false,
|
||||
])
|
||||
|
||||
<select
|
||||
{{ $attributes->class(['select2', 'livewire-select2' => $forLivewire]) }}
|
||||
@if($forLivewire) data-livewire-component="{{ $this->getId() }}" @endif
|
||||
>
|
||||
@if($includeEmpty)
|
||||
<option value=""></option>
|
||||
@endif
|
||||
{{-- map the simple key => value pairs when nothing is passed in via the slot --}}
|
||||
@if($slot->isEmpty())
|
||||
@foreach($options as $key => $value)
|
||||
<option value="{{ $key }}" @selected($selected == $key)>{{ $value }}</option>
|
||||
@endforeach
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</select>
|
|
@ -15,7 +15,14 @@
|
|||
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
|
||||
<label for="category_type" class="col-md-3 control-label">{{ trans('general.type') }}</label>
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('category_type', $category_types , old('category_type', $item->category_type), array('class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'category_type', ($item->category_type!='') || ($item->itemCount() > 0) ? 'disabled' : '')) }}
|
||||
<x-input.select
|
||||
name="category_type"
|
||||
:options="$category_types"
|
||||
:selected="old('category_type', $item->category_type)"
|
||||
:disabled="$item->category_type!='' || $item->itemCount() > 0"
|
||||
style="min-width:350px"
|
||||
aria-label="category_type"
|
||||
/>
|
||||
{!! $errors->first('category_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
|
|
@ -94,7 +94,14 @@
|
|||
}
|
||||
@endphp
|
||||
<div class="col-md-8 required">
|
||||
{{ Form::select("format",Helper::predefined_formats(), ($field_format == '') ? $field->format : $field_format, array('class'=>'format select2 form-control', 'aria-label'=>'format', 'style' => 'width:100%;')) }}
|
||||
<x-input.select
|
||||
name="format"
|
||||
:options="Helper::predefined_formats()"
|
||||
:selected="($field_format == '') ? $field->format : $field_format"
|
||||
class="format form-control"
|
||||
style="width:100%"
|
||||
aria-label="format"
|
||||
/>
|
||||
{!! $errors->first('format', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -95,8 +95,12 @@
|
|||
<label for="field_id" class="sr-only">
|
||||
{{ trans('admin/custom-field/general.add_field_to_fieldset')}}
|
||||
</label>
|
||||
{{ Form::select("field_id",$custom_fields_list,"",['aria-label'=>'field_id', 'class'=>'select2', 'style' => 'min-width:400px;']) }}
|
||||
|
||||
<x-input.select
|
||||
name="field_id"
|
||||
:options="$custom_fields_list"
|
||||
style="min-width:400px"
|
||||
aria-label="field_id"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none;">
|
||||
|
|
|
@ -125,7 +125,13 @@
|
|||
{{ trans('admin/hardware/form.status') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:100%', 'aria-label'=>'status_id')) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
:options="$statuslabel_list"
|
||||
:selected="old('status_id')"
|
||||
style="width: 100%"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
<p class="help-block">{{ trans('general.status_compatibility') }}</p>
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,13 @@
|
|||
{{ trans('admin/hardware/form.status') }}
|
||||
</label>
|
||||
<div class="col-md-8 required">
|
||||
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-statuslabel_types', 'aria-label'=>'status_id')) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
id="modal-statuslabel_types"
|
||||
:options="$statusLabel_list"
|
||||
style="width: 100%"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -154,4 +160,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -82,7 +82,13 @@
|
|||
{{ trans('admin/hardware/form.status') }}
|
||||
</label>
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('status_id', $statusLabel_list, $asset->status_id, array('class'=>'select2', 'style'=>'width:100%','', 'aria-label'=>'status_id')) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
:options="$statusLabel_list"
|
||||
:selected="$asset->status_id"
|
||||
style="width: 100%;"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -47,7 +47,13 @@
|
|||
{{ trans('admin/hardware/form.status') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','', 'aria-label'=>'status_id')) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
id="status_id"
|
||||
:options="$statusLabel_list"
|
||||
style="width:100%"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,16 @@
|
|||
{{ trans('admin/models/general.fieldset') }}
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::select('fieldset_id', Helper::customFieldsetList(), old('fieldset_id', $fieldset_id), array('class'=>'select2 js-fieldset-field livewire-select2', 'style'=>'width:100%; min-width:350px', 'aria-label'=>'custom_fieldset', 'data-livewire-component' => $this->getId())) }}
|
||||
<x-input.select
|
||||
name="fieldset_id"
|
||||
id="fieldset_id"
|
||||
:options="Helper::customFieldsetList()"
|
||||
:selected="old('fieldset_id', $fieldset_id)"
|
||||
:for-livewire="true"
|
||||
class="js-fieldset-field"
|
||||
style="width:100%; min-width:350px;"
|
||||
aria-label="custom_fieldset"
|
||||
/>
|
||||
{!! $errors->first('custom_fieldset', '<span class="alert-msg" aria-hidden="true"><br><i class="fas fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
|
|
@ -155,15 +155,20 @@
|
|||
</label>
|
||||
|
||||
<div class="col-md-9 col-xs-12">
|
||||
{{ Form::select('typeOfImport', $importTypes, $typeOfImport, [
|
||||
'id' => 'import_type',
|
||||
'class' => 'livewire-select2',
|
||||
'style' => 'min-width: 350px',
|
||||
'data-placeholder' => trans('general.select_var', ['thing' => trans('general.import_type')]),
|
||||
'placeholder' => '', //needed so that the form-helper will put an empty option first
|
||||
'data-minimum-results-for-search' => '-1', // Remove this if the list gets long enough that we need to search
|
||||
'data-livewire-component' => $this->getId()
|
||||
]) }}
|
||||
<x-input.select
|
||||
name="typeOfImport"
|
||||
id="import_type"
|
||||
:options="$importTypes"
|
||||
:selected="$typeOfImport"
|
||||
:for-livewire="true"
|
||||
:include-empty="true"
|
||||
:data-placeholder="trans('general.select_var', ['thing' => trans('general.import_type')])"
|
||||
{{--placeholder needed so that the form-helper will put an empty option first--}}
|
||||
placeholder=""
|
||||
{{--Remove this if the list gets long enough that we need to search--}}
|
||||
data-minimum-results-for-search="-1"
|
||||
style="min-width: 350px;"
|
||||
/>
|
||||
@if ($typeOfImport === 'asset' && $snipeSettings->auto_increment_assets == 0)
|
||||
<p class="help-block">
|
||||
{{ trans('general.auto_incrementing_asset_tags_disabled_so_tags_required') }}
|
||||
|
@ -238,17 +243,22 @@
|
|||
|
||||
<label for="field_map.{{ $index }}" class="col-md-3 control-label text-right">{{ $header }}</label>
|
||||
<div class="col-md-4">
|
||||
|
||||
{{ Form::select('field_map.'.$index, $columnOptions[$typeOfImport], @$field_map[$index],
|
||||
[
|
||||
'class' => 'mappings livewire-select2',
|
||||
'placeholder' => trans('general.importer.do_not_import'),
|
||||
'style' => 'min-width: 100%',
|
||||
'data-livewire-component' => $this->getId()
|
||||
],[
|
||||
'-' => ['disabled' => true] // this makes the "-----" line unclickable
|
||||
])
|
||||
}}
|
||||
<x-input.select
|
||||
:name="'field_map.'.$index"
|
||||
:for-livewire="true"
|
||||
:placeholder="trans('general.importer.do_not_import')"
|
||||
class="mappings"
|
||||
style="min-width: 100%;"
|
||||
>
|
||||
<option selected="selected" value="">Do Not Import</option>
|
||||
@foreach($columnOptions[$typeOfImport] as $key => $value)
|
||||
<option
|
||||
value="{{ $key }}"
|
||||
@selected(@$field_map[$index] === $key)
|
||||
@disabled($key === '-')
|
||||
>{{ $value }}</option>
|
||||
@endforeach
|
||||
</x-input.select>
|
||||
</div>
|
||||
@if (($this->activeFile->first_row) && (array_key_exists($index, $this->activeFile->first_row)))
|
||||
<div class="col-md-5">
|
||||
|
|
|
@ -66,13 +66,17 @@
|
|||
</label>
|
||||
</div>
|
||||
<div class="col-md-9 required" wire:ignore>
|
||||
|
||||
@if (Helper::isDemoMode())
|
||||
{{ Form::select('webhook_selected', array('slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook'),'google' => trans('admin/settings/general.google_workspaces'), 'microsoft' => trans('admin/settings/general.ms_teams')), old('webhook_selected', $webhook_selected), array('class'=>'select2 form-control', 'aria-label' => 'webhook_selected', 'id' => 'select2', 'style'=>'width:100%', 'disabled')) }}
|
||||
@else
|
||||
{{ Form::select('webhook_selected', array('slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook'),'google' => trans('admin/settings/general.google_workspaces'), 'microsoft' => trans('admin/settings/general.ms_teams')), old('webhook_selected', $webhook_selected), array('class'=>'select2 form-control', 'aria-label' => 'webhook_selected', 'id' => 'select2', 'data-minimum-results-for-search' => '-1', 'style'=>'width:100%')) }}
|
||||
@endif
|
||||
|
||||
<x-input.select
|
||||
name="webhook_selected"
|
||||
id="select2"
|
||||
:options="['slack' => trans('admin/settings/general.slack'), 'general' => trans('admin/settings/general.general_webhook'),'google' => trans('admin/settings/general.google_workspaces'), 'microsoft' => trans('admin/settings/general.ms_teams')]"
|
||||
:selected="old('webhook_selected', $webhook_selected)"
|
||||
:disabled="Helper::isDemoMode()"
|
||||
data-minimum-results-for-search="-1"
|
||||
class="form-control"
|
||||
style="width:100%"
|
||||
aria-label="webhook_selected"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12"><label for="modal-fieldset_id">{{ trans('admin/models/general.fieldset') }}:</label></div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('fieldset_id', Helper::customFieldsetList(),old('fieldset_id'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:100%;')) }}</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<x-input.select
|
||||
name="fieldset_id"
|
||||
id="modal-fieldset_id"
|
||||
:options="Helper::customFieldsetList()"
|
||||
:selected="old('fieldset_id')"
|
||||
style="width:100%;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
||||
<!-- partials/modals/partials/fieldset-select.blade.php -->
|
||||
|
|
|
@ -16,7 +16,15 @@
|
|||
<div class="dynamic-form-row">
|
||||
<div class="col-md-3 col-xs-12"><label for="modal-type">{{ trans('admin/statuslabels/table.status_type') }}:
|
||||
</label></div>
|
||||
<div class="col-md-8 col-xs-12">{{ Form::select('type', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-type', 'required',)) }}</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
<x-input.select
|
||||
name="type"
|
||||
id="modal-type"
|
||||
:options="$statuslabel_types"
|
||||
required
|
||||
style="width:100%;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -62,7 +62,13 @@
|
|||
{{ trans('admin/models/general.fieldset') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('fieldset_id', $fieldset_list , old('fieldset_id', 'NC'), array('class'=>'select2 js-fieldset-field', 'style'=>'width:350px')) }}
|
||||
<x-input.select
|
||||
name="fieldset_id"
|
||||
:options="$fieldset_list"
|
||||
:selected="old('fieldset_id', 'NC')"
|
||||
class="js-fieldset-field"
|
||||
style="width:350px"
|
||||
/>
|
||||
{!! $errors->first('fieldset_id', '<span class="alert-msg" aria-hidden="true"><br><i class="fas fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,7 +80,12 @@
|
|||
{{ trans('general.depreciation') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', 'NC'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
<x-input.select
|
||||
name="depreciation_id"
|
||||
:options="$depreciation_list"
|
||||
:selected="old('depreciation_id', 'NC')"
|
||||
style="width:350px"
|
||||
/>
|
||||
{!! $errors->first('depreciation_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,8 +17,13 @@
|
|||
|
||||
@if ($field->element=='listbox')
|
||||
<!-- Listbox -->
|
||||
{{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(),
|
||||
old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class' => 'format select2 form-control', ($field->pivot->required=='1' ? ' required' : '') ]) }}
|
||||
<x-input.select
|
||||
:name="$field->db_column_name()"
|
||||
:options="$field->formatFieldValuesAsArray()"
|
||||
:selected="old($field->db_column_name(), (isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id)))"
|
||||
:required="$field->pivot->required == '1'"
|
||||
class="format form-control"
|
||||
/>
|
||||
|
||||
@elseif ($field->element=='textarea')
|
||||
<!-- Textarea -->
|
||||
|
|
|
@ -24,8 +24,12 @@
|
|||
@if ($field->element!='text')
|
||||
<!-- Listbox -->
|
||||
@if ($field->element=='listbox')
|
||||
{{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(),
|
||||
old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }}
|
||||
<x-input.select
|
||||
:name="$field->db_column_name()"
|
||||
:options="$field->formatFieldValuesAsArray()"
|
||||
:selected="old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id)))"
|
||||
class="format form-control"
|
||||
/>
|
||||
|
||||
@elseif ($field->element=='textarea')
|
||||
@if($field->is_unique)
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<!-- Category -->
|
||||
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
|
||||
<label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('category_id', $category_list , old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'category_id') ? true : '')) }}
|
||||
{!! $errors->first('category_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
|
@ -1,11 +0,0 @@
|
|||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">
|
||||
<label for="company_id" class="col-md-3 control-label">{{ trans('general.company') }}</label>
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'company_id') ? true : '')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
|
@ -2,7 +2,14 @@
|
|||
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
|
||||
<label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px', 'aria-label'=>'depreciation_id')) }}
|
||||
<x-input.select
|
||||
name="depreciation_id"
|
||||
id="depreciation_id"
|
||||
:options="$depreciation_list"
|
||||
:selected="old('depreciation_id', $item->depreciation_id)"
|
||||
style="width:350px;"
|
||||
aria-label="depreciation_id"
|
||||
/>
|
||||
{!! $errors->first('depreciation_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
|
||||
<label for="location_id" class="col-md-3 control-label">{{ trans('general.location') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('location_id', $location_list , old('location_id', $item->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
|
@ -3,7 +3,14 @@
|
|||
<label for="asset_maintenance_type" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , old('asset_maintenance_type', $item->asset_maintenance_type), ['class'=>'select2', 'aria-label'=>'asset_maintenance_type', 'required' => Helper::checkIfRequired($item, 'asset_maintenance_type') ? true : '', 'style'=> 'width:100%;']) }}
|
||||
<x-input.select
|
||||
name="asset_maintenance_type"
|
||||
:options="$assetMaintenanceType"
|
||||
:selected="old('asset_maintenance_type', $item->asset_maintenance_type)"
|
||||
:required="Helper::checkIfRequired($item, 'asset_maintenance_type')"
|
||||
style="width:100%;"
|
||||
aria-label="asset_maintenance_type"
|
||||
/>
|
||||
{!! $errors->first('asset_maintenance_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<!-- Manufacturer -->
|
||||
<div class="form-group{{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
|
||||
<label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , old('manufacturer_id', $item->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%', 'required' => Helper::checkIfRequired($item, 'manufacturer_id') ? true : '')) }}
|
||||
{!! $errors->first('manufacturer_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
|
@ -2,7 +2,16 @@
|
|||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'required' => 'required')) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
id="status_select_id"
|
||||
:options="$statuslabel_list"
|
||||
:selected="old('status_id', $item->status_id)"
|
||||
:required="$required"
|
||||
class="status_id"
|
||||
style="width:100%;"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 text-left">
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<!-- Supplier -->
|
||||
<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
|
||||
<label for="supplier_id" class="col-md-3 control-label">{{ trans('general.supplier') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('supplier_id', $supplier_list , old('supplier_id', $item->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px', 'id' => 'supplier_select_id', 'required' => Helper::checkIfRequired($item, 'supplier_id') ? true : '']) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
|
||||
</div>
|
||||
</div>
|
|
@ -78,11 +78,19 @@
|
|||
<label for="brand">{{ trans('admin/settings/general.web_brand') }}</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{!! Form::select('brand', [
|
||||
'1'=> trans('admin/settings/general.logo_option_types.text'),
|
||||
'2'=> trans('admin/settings/general.logo_option_types.logo'),
|
||||
'3'=> trans('admin/settings/general.logo_option_types.logo_and_text')], old('brand', $setting->brand), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
|
||||
<x-input.select
|
||||
name="brand"
|
||||
id="brand"
|
||||
:options="[
|
||||
'1' => trans('admin/settings/general.logo_option_types.text'),
|
||||
'2' => trans('admin/settings/general.logo_option_types.logo'),
|
||||
'3' => trans('admin/settings/general.logo_option_types.logo_and_text'),
|
||||
]"
|
||||
:selected="old('brand', $setting->brand)"
|
||||
class="form-control"
|
||||
style="width: 150px"
|
||||
/>
|
||||
{!! $errors->first('brand', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -277,10 +285,25 @@
|
|||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<x-input.select
|
||||
name="support_footer"
|
||||
id="support_footer"
|
||||
:options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
|
||||
:selected="old('support_footer', $setting->support_footer)"
|
||||
disabled
|
||||
class="form-control disabled"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('support_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('support_footer', $setting->support_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
<x-input.select
|
||||
name="support_footer"
|
||||
id="support_footer"
|
||||
:options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
|
||||
:selected="old('support_footer', $setting->support_footer)"
|
||||
class="form-control"
|
||||
style="width: 150px"
|
||||
/>
|
||||
@endif
|
||||
|
||||
|
||||
|
@ -296,10 +319,25 @@
|
|||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), ['class' => 'form-control select2 disabled', 'style'=>'width: 150px ;', 'disabled' => 'disabled']) !!}
|
||||
<x-input.select
|
||||
name="version_footer"
|
||||
id="version_footer"
|
||||
:options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
|
||||
:selected="old('version_footer', $setting->version_footer)"
|
||||
disabled
|
||||
class="form-control disabled"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@else
|
||||
{!! Form::select('version_footer', array('on'=>trans('admin/settings/general.enabled'),'off'=>trans('admin/settings/general.two_factor_disabled'),'admin'=>trans('admin/settings/general.super_admin_only')), old('version_footer', $setting->version_footer), array('class' => 'form-control select2', 'style'=>'width: 150px ;')) !!}
|
||||
<x-input.select
|
||||
name="version_footer"
|
||||
id="version_footer"
|
||||
:options="['on' => trans('admin/settings/general.enabled'), 'off' => trans('admin/settings/general.two_factor_disabled'), 'admin' => trans('admin/settings/general.super_admin_only')]"
|
||||
:selected="old('version_footer', $setting->version_footer)"
|
||||
class="form-control"
|
||||
style="width: 150px"
|
||||
/>
|
||||
@endif
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.version_footer_help') }}</p>
|
||||
|
|
|
@ -364,9 +364,12 @@
|
|||
<label for="show_in_model_list">{{ trans('general.pie_chart_type') }}</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('dash_chart_type', array(
|
||||
'name' => 'Status Label Name',
|
||||
'type' => 'Status Label Type'), old('dash_chart_type', $setting->dash_chart_type), ['class' =>'select2', 'style' => 'width: 80%']) }}
|
||||
<x-input.select
|
||||
name="dash_chart_type"
|
||||
:options="['name' => 'Status Label Name', 'type' => 'Status Label Type']"
|
||||
:selected="old('dash_chart_type', $setting->dash_chart_type)"
|
||||
style="width: 80%"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -377,11 +380,13 @@
|
|||
<label for="depreciation_method">{{ trans('admin/depreciations/general.depreciation_method') }}</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('depreciation_method', array(
|
||||
'default' => trans('admin/depreciations/general.linear_depreciation'),
|
||||
'half_1' => trans('admin/depreciations/general.half_1'),
|
||||
'half_2' => trans('admin/depreciations/general.half_2'),
|
||||
), old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}
|
||||
<x-input.select
|
||||
name="depreciation_method"
|
||||
id="depreciation_method"
|
||||
:options="['default' => trans('admin/depreciations/general.linear_depreciation'), 'half_1' => trans('admin/depreciations/general.half_1'), 'half_2' => trans('admin/depreciations/general.half_2')]"
|
||||
:selected="old('depreciation_method', $setting->depreciation_method)"
|
||||
style="width: 80%"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
|
|
|
@ -169,7 +169,14 @@
|
|||
'none' => trans('admin/settings/general.none'),
|
||||
];
|
||||
@endphp
|
||||
{{ Form::select('label2_1d_type', $select1DValues, old('label2_1d_type', $setting->label2_1d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_1d_type' ]) }}
|
||||
<x-input.select
|
||||
name="label2_1d_type"
|
||||
id="label2_1d_type"
|
||||
:options="$select1DValues"
|
||||
:selected="old('label2_1d_type', $setting->label2_1d_type)"
|
||||
class="col-md-4"
|
||||
aria-label="label2_1d_type"
|
||||
/>
|
||||
{!! $errors->first('label2_1d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.label2_1d_type_help') }}.
|
||||
|
@ -213,7 +220,14 @@
|
|||
'none' => trans('admin/settings/general.none'),
|
||||
]);
|
||||
@endphp
|
||||
{{ Form::select('label2_2d_type', $select2DValues, old('label2_2d_type', $setting->label2_2d_type), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_type' ]) }}
|
||||
<x-input.select
|
||||
name="label2_2d_type"
|
||||
id="label2_2d_type"
|
||||
:options="$select2DValues"
|
||||
:selected="old('label2_2d_type', $setting->label2_2d_type)"
|
||||
class="col-md-4"
|
||||
aria-label="label2_2d_type"
|
||||
/>
|
||||
{!! $errors->first('label2_2d_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">
|
||||
{{ trans('admin/settings/general.label2_2d_type_help', ['current' => $setting->barcode_type]) }}.
|
||||
|
@ -284,13 +298,14 @@
|
|||
<label for="label2_2d_target" class="control-label">{{ trans('admin/settings/general.label2_2d_target') }}</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('label2_2d_target', [
|
||||
'hardware_id' => trans('general.url') .': /hardware/{id} ('.trans('admin/settings/general.default').')',
|
||||
'ht_tag' => trans('general.url') .': /ht/{asset_tag}',
|
||||
'plain_asset_id' => trans('admin/settings/general.data') .': '. trans('admin/settings/general.asset_id') .' {id}',
|
||||
'plain_asset_tag' => trans('admin/settings/general.data') .': '. trans('general.asset_tag') .' {asset_tag}',
|
||||
'plain_serial_number' => trans('admin/settings/general.data') .': '. trans('general.serial_number') .' {serial}',
|
||||
], old('label2_2d_target', $setting->label2_2d_target), [ 'class'=>'select2 col-md-4', 'aria-label'=>'label2_2d_target' ]) }}
|
||||
<x-input.select
|
||||
name="label2_2d_target"
|
||||
id="label2_2d_target"
|
||||
:options="['hardware_id'=>'/hardware/{id} ('.trans('admin/settings/general.default').')', 'ht_tag'=>'/ht/{asset_tag}']"
|
||||
:selected="old('label2_2d_target', $setting->label2_2d_target)"
|
||||
class="col-md-4"
|
||||
aria-label="label2_2d_target"
|
||||
/>
|
||||
{!! $errors->first('label2_2d_target', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/settings/general.label2_2d_target_help') }}</p>
|
||||
</div>
|
||||
|
|
|
@ -27,7 +27,13 @@
|
|||
{{ trans('admin/statuslabels/table.status_type') }}
|
||||
</label>
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('statuslabel_types', $statuslabel_types, $item->getStatuslabelType(), array('class'=>'select2', 'style'=>'width: 100%; min-width:400px', 'aria-label'=>'statuslabel_types')) }}
|
||||
<x-input.select
|
||||
name="statuslabel_types"
|
||||
:options="$statuslabel_types"
|
||||
:selected="$item->getStatuslabelType()"
|
||||
style="width: 100%; min-width:400px"
|
||||
aria-label="statuslabel_types"
|
||||
/>
|
||||
{!! $errors->first('statuslabel_types', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -109,7 +109,15 @@
|
|||
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id'), array('class'=>'select2', 'style'=>'width:250px', 'required' => true)) }}
|
||||
<x-input.select
|
||||
name="status_id"
|
||||
id="status_id"
|
||||
:options="$statuslabel_list"
|
||||
:selected="old('status_id')"
|
||||
required
|
||||
style="width:250px"
|
||||
aria-label="status_id"
|
||||
/>
|
||||
<label>{{ trans('admin/users/general.update_user_assets_status') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -159,4 +167,4 @@
|
|||
}
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@stop
|
||||
|
|
Loading…
Reference in a new issue