Merge branch 'hotfixes/eol' into develop

# Conflicts:
#	app/Http/Controllers/AssetModelsController.php
This commit is contained in:
snipe 2016-09-27 07:04:45 -07:00
commit 1e3244b2b3
2 changed files with 11 additions and 9 deletions

View file

@ -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'));
} }

View file

@ -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 -->