@@ -155,15 +155,20 @@ class="col-md-12 table table-striped snipe-table">
155155 </label >
156156
157157 <div class =" col-md-9 col-xs-12" >
158- {{ Form:: select (' typeOfImport' , $importTypes , $typeOfImport , [
159- ' id' => ' import_type' ,
160- ' class' => ' livewire-select2' ,
161- ' style' => ' min-width: 350px' ,
162- ' data-placeholder' => trans (' general.select_var' , [' thing' => trans (' general.import_type' )]),
163- ' placeholder' => ' ' , // needed so that the form-helper will put an empty option first
164- ' data-minimum-results-for-search' => ' -1' , // Remove this if the list gets long enough that we need to search
165- ' data-livewire-component' => $this -> getId ()
166- ]) } }
158+ <x-input .select
159+ name =" typeOfImport"
160+ id =" import_type"
161+ :options =" $importTypes"
162+ :selected =" $typeOfImport"
163+ :for-livewire =" true"
164+ :include-empty =" true"
165+ :data-placeholder =" trans('general.select_var', ['thing' => trans('general.import_type')])"
166+ {{-- placeholder needed so that the form-helper will put an empty option first--}}
167+ placeholder =" "
168+ {{-- Remove this if the list gets long enough that we need to search--}}
169+ data-minimum-results-for-search =" -1"
170+ style =" min-width : 350px ;"
171+ />
167172 @if ($typeOfImport === ' asset' && $snipeSettings -> auto_increment_assets == 0 )
168173 <p class =" help-block" >
169174 {{ trans (' general.auto_incrementing_asset_tags_disabled_so_tags_required' ) } }
@@ -238,17 +243,22 @@ class="col-md-12 table table-striped snipe-table">
238243
239244 <label for =" field_map.{{ $index } }" class =" col-md-3 control-label text-right" >{{ $header } } </label >
240245 <div class =" col-md-4" >
241-
242- {{ Form:: select (' field_map.' . $index , $columnOptions [$typeOfImport ], @ $field_map [$index ],
243- [
244- ' class' => ' mappings livewire-select2' ,
245- ' placeholder' => trans (' general.importer.do_not_import' ),
246- ' style' => ' min-width: 100%' ,
247- ' data-livewire-component' => $this -> getId ()
248- ],[
249- ' -' => [' disabled' => true ] // this makes the "-----" line unclickable
250- ])
251- } }
246+ <x-input .select
247+ :name =" 'field_map.'.$index"
248+ :for-livewire =" true"
249+ :placeholder =" trans('general.importer.do_not_import')"
250+ class =" mappings"
251+ style =" min-width : 100% ;"
252+ >
253+ <option selected =" selected" value =" " >Do Not Import</option >
254+ @foreach ($columnOptions [$typeOfImport ] as $key => $value )
255+ <option
256+ value =" {{ $key } }"
257+ @selected (@ $field_map [$index ] === $key )
258+ @disabled ($key === ' -' )
259+ >{{ $value } } </option >
260+ @endforeach
261+ </x-input .select >
252262 </div >
253263 @if (($this -> activeFile -> first_row ) && (array_key_exists ($index , $this -> activeFile -> first_row )) )
254264 <div class =" col-md-5" >
0 commit comments