mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Default EOL to null, not 0, if no value entered
This commit is contained in:
parent
0a391de09f
commit
a92bfe8ade
|
@ -141,7 +141,7 @@ class AssetModelsController extends Controller
|
||||||
$model = new AssetModel;
|
$model = new AssetModel;
|
||||||
|
|
||||||
$settings=Input::all();
|
$settings=Input::all();
|
||||||
$settings['eol']=0;
|
$settings['eol']= null;
|
||||||
|
|
||||||
$model->name=e(Input::get('name'));
|
$model->name=e(Input::get('name'));
|
||||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||||
|
@ -149,7 +149,7 @@ class AssetModelsController extends Controller
|
||||||
$model->modelno = e(Input::get('modelno'));
|
$model->modelno = e(Input::get('modelno'));
|
||||||
$model->user_id = Auth::user()->id;
|
$model->user_id = Auth::user()->id;
|
||||||
$model->note = e(Input::get('note'));
|
$model->note = e(Input::get('note'));
|
||||||
$model->eol=0;
|
$model->eol= null;
|
||||||
|
|
||||||
if (Input::get('fieldset_id')=='') {
|
if (Input::get('fieldset_id')=='') {
|
||||||
$model->fieldset_id = null;
|
$model->fieldset_id = null;
|
||||||
|
@ -217,7 +217,7 @@ class AssetModelsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e(Input::get('eol')) == '') {
|
if (e(Input::get('eol')) == '') {
|
||||||
$model->eol = 0;
|
$model->eol = null;
|
||||||
} else {
|
} else {
|
||||||
$model->eol = e(Input::get('eol'));
|
$model->eol = e(Input::get('eol'));
|
||||||
}
|
}
|
||||||
|
@ -228,6 +228,7 @@ class AssetModelsController extends Controller
|
||||||
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
$model->manufacturer_id = e(Input::get('manufacturer_id'));
|
||||||
$model->category_id = e(Input::get('category_id'));
|
$model->category_id = e(Input::get('category_id'));
|
||||||
$model->note = e(Input::get('note'));
|
$model->note = e(Input::get('note'));
|
||||||
|
|
||||||
if (Input::get('custom_fieldset')=='') {
|
if (Input::get('custom_fieldset')=='') {
|
||||||
$model->fieldset_id = null;
|
$model->fieldset_id = null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -87,15 +87,17 @@
|
||||||
|
|
||||||
<div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
|
<div class="form-group {{ $errors->has('eol') ? ' has-error' : '' }}">
|
||||||
<label for="eol" class="col-md-3 control-label">{{ trans('general.eol') }}</label>
|
<label for="eol" class="col-md-3 control-label">{{ trans('general.eol') }}</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-2">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="col-md-1 form-control" type="text" name="eol" id="eol" value="{{ Input::old('eol', isset($model->eol)) ? $model->eol : 0 }}" />
|
<input class="col-md-1 form-control" type="text" name="eol" id="eol" value="{{ Input::old('eol', isset($model->eol)) ? $model->eol : '' }}" />
|
||||||
<span class="input-group-addon">
|
<span class="input-group-addon">
|
||||||
{{ trans('general.months') }}
|
{{ trans('general.months') }}
|
||||||
</span>
|
</span>
|
||||||
{!! $errors->first('eol', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-9 col-md-offset-3">
|
||||||
|
{!! $errors->first('eol', '<span class="alert-msg"><br><i class="fa fa-times"></i> :message</span>') !!}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Custom Fieldset -->
|
<!-- Custom Fieldset -->
|
||||||
|
|
Loading…
Reference in a new issue