diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index effaf5cea9..bd8e063df1 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -142,8 +142,6 @@ class AssetModelsController extends Controller $settings=Input::all(); $settings['eol']=0; - // - $model->name=e(Input::get('name')); $model->manufacturer_id = e(Input::get('manufacturer_id')); @@ -153,6 +151,12 @@ class AssetModelsController extends Controller $model->note = e(Input::get('note')); $model->eol=0; + if (Input::get('fieldset_id')=='') { + $model->fieldset_id = null; + } else { + $model->fieldset_id = e(Input::get('fieldset_id')); + } + if ($model->save()) { return JsonResponse::create($model); } else { diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 515ed35661..ea7cafb20e 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -44,14 +44,14 @@
-
+
-
{{ Form::select('modal-statuslabel_types', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-statuslabel_types')) }}
+
{{ Form::select('modal-statuslabel_types', $statuslabel_types, '', array('class'=>'select2', 'style'=>'width:90%','id' =>'modal-statuslabel_types')) }}
@@ -64,6 +64,11 @@
{!! Form::countries('country', Input::old('country'), 'select2 country',"modal-country") !!}
+
+
+
{{ Form::select('custom_fieldset', \App\Helpers\Helper::customFieldsetList(),Input::old('custom_fieldset'), array('class'=>'select2', 'id'=>'modal-fieldset_id', 'style'=>'width:350px')) }}
+
+
@@ -391,23 +396,20 @@ @section('moar_scripts')