A free open source IT asset/license management system
Convert additional Form::select to blade component
Marcus Moore9a043da005f2
diff --git a/resources/views/settings/general.blade.php b/resources/views/settings/general.blade.phpindex 1de5d4035d..3a549525d3 100644--- a/resources/views/settings/general.blade.php+++ b/resources/views/settings/general.blade.php@@ -359,9 +359,12 @@trans('general.pie_chart_type')) }}</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>@@ -372,11 +375,13 @@{{ Form::label('depreciation_method', trans('Depreciation method')) }}</div><div class="col-md-9">- {{ Form::select('depreciation_method', array(- 'default' => 'Linear (default)',- 'half_1' => 'Half-year convention, always applied',- 'half_2' => 'Half-year convention, applied with condition',- ), old('username_format', $setting->depreciation_method), ['class' =>'select2', 'style' => 'width: 80%']) }}+ <x-input.select+ name="depreciation_method"+ id="depreciation_method"+ :options="['default' => 'Linear (default)', 'half_1' => 'Half-year convention, always applied', 'half_2' => 'Half-year convention, applied with condition']"+ :selected="old('depreciation_method', $setting->depreciation_method)"+ style="width: 80%"+ /></div></div><!-- /.form-group -->diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.phpindex fa8c5dc858..8666ab8727 100644--- a/resources/views/settings/labels.blade.php+++ b/resources/views/settings/labels.blade.php@@ -170,7 +170,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') }}.@@ -214,7 +221,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]) }}.@@ -277,13 +291,14 @@{{ Form::label('label2_2d_target', trans('admin/settings/general.label2_2d_target'), ['class'=>'control-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>diff --git a/resources/views/statuslabels/edit.blade.php b/resources/views/statuslabels/edit.blade.phpindex af69f35de8..27fb91148b 100755--- a/resources/views/statuslabels/edit.blade.php+++ b/resources/views/statuslabels/edit.blade.php@@ -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>