diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index 1fadcaa3a6..4e618798e9 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -141,7 +141,7 @@ class AssetModelsController extends Controller $model = new AssetModel; $settings=Input::all(); - $settings['eol']=0; + $settings['eol']= null; $model->name=e(Input::get('name')); $model->manufacturer_id = e(Input::get('manufacturer_id')); @@ -149,7 +149,7 @@ class AssetModelsController extends Controller $model->modelno = e(Input::get('modelno')); $model->user_id = Auth::user()->id; $model->note = e(Input::get('note')); - $model->eol=0; + $model->eol= null; if (Input::get('fieldset_id')=='') { $model->fieldset_id = null; @@ -217,7 +217,7 @@ class AssetModelsController extends Controller } if (e(Input::get('eol')) == '') { - $model->eol = 0; + $model->eol = null; } else { $model->eol = e(Input::get('eol')); } @@ -228,6 +228,7 @@ class AssetModelsController extends Controller $model->manufacturer_id = e(Input::get('manufacturer_id')); $model->category_id = e(Input::get('category_id')); $model->note = e(Input::get('note')); + if (Input::get('custom_fieldset')=='') { $model->fieldset_id = null; } else { diff --git a/resources/views/models/edit.blade.php b/resources/views/models/edit.blade.php index 9dfde7afca..7aed5ee00d 100755 --- a/resources/views/models/edit.blade.php +++ b/resources/views/models/edit.blade.php @@ -87,15 +87,17 @@
-
+
- - - {{ trans('general.months') }} - - {!! $errors->first('eol', '
:message
') !!} + + + {{ trans('general.months') }} +
+
+ {!! $errors->first('eol', '
:message
') !!} +