A free open source IT asset/license management system
Convert Form::select to blade component
Marcus Moored74454620a72
diff --git a/resources/views/categories/edit.blade.php b/resources/views/categories/edit.blade.phpindex 1ef3b7aa6a..d19e44dcd4 100755--- a/resources/views/categories/edit.blade.php+++ b/resources/views/categories/edit.blade.php@@ -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">diff --git a/resources/views/custom_fields/fields/edit.blade.php b/resources/views/custom_fields/fields/edit.blade.phpindex 12c3a3fb73..463019f884 100644--- a/resources/views/custom_fields/fields/edit.blade.php+++ b/resources/views/custom_fields/fields/edit.blade.php@@ -88,7 +88,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>diff --git a/resources/views/custom_fields/fieldsets/view.blade.php b/resources/views/custom_fields/fieldsets/view.blade.phpindex b73ae708c6..6868c21634 100644--- a/resources/views/custom_fields/fieldsets/view.blade.php+++ b/resources/views/custom_fields/fieldsets/view.blade.php@@ -98,8 +98,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;">diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.phpindex cc44993af5..9eefd48d31 100755--- a/resources/views/hardware/bulk.blade.php+++ b/resources/views/hardware/bulk.blade.php@@ -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>diff --git a/resources/views/hardware/checkin.blade.php b/resources/views/hardware/checkin.blade.phpindex 9188d81eaa..ef31892698 100755--- a/resources/views/hardware/checkin.blade.php+++ b/resources/views/hardware/checkin.blade.php@@ -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>@@ -142,4 +148,4 @@</div></div>-@stop\ No newline at end of file+@stopdiff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.phpindex e0dc8ef519..ca297fa9ce 100755--- a/resources/views/hardware/checkout.blade.php+++ b/resources/views/hardware/checkout.blade.php@@ -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>