A free open source IT asset/license management system
Added maxlength="10"
snipe74babfa081a1
diff --git a/app/Models/License.php b/app/Models/License.phpindex 41a3d7a52a..ff69d5f66d 100755--- a/app/Models/License.php+++ b/app/Models/License.php@@ -49,9 +49,9 @@ class License extends Depreciable'category_id' => 'required|exists:categories,id','company_id' => 'integer|nullable','purchase_cost'=> 'numeric|nullable|gte:0',- 'purchase_date' => 'date_format:Y-m-d|nullable',- 'expiration_date' => 'date_format:Y-m-d|nullable',- 'termination_date' => 'date_format:Y-m-d|nullable',+ 'purchase_date' => 'date_format:Y-m-d|nullable|max:10',+ 'expiration_date' => 'date_format:Y-m-d|nullable|max:10',+ 'termination_date' => 'date_format:Y-m-d|nullable|max:10',];/**diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.phpindex f45e69ce96..cdbbc23e74 100755--- a/resources/views/licenses/edit.blade.php+++ b/resources/views/licenses/edit.blade.php@@ -79,7 +79,7 @@<div class="input-group col-md-4"><div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expiration_date" id="expiration_date" value="{{ old('expiration_date', $item->expiration_date) }}">+ <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expiration_date" id="expiration_date" value="{{ old('expiration_date', $item->expiration_date) }}" maxlength="10"><span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span></div>{!! $errors->first('expiration_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}@@ -93,7 +93,7 @@<div class="input-group col-md-4"><div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true" data-date-clear-btn="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="termination_date" id="termination_date" value="{{ old('termination_date', $item->termination_date) }}">+ <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="termination_date" id="termination_date" value="{{ old('termination_date', $item->termination_date) }}" maxlength="10"><span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span></div>{!! $errors->first('termination_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}diff --git a/resources/views/partials/forms/edit/datepicker.blade.php b/resources/views/partials/forms/edit/datepicker.blade.phpindex 3e5f1d478d..9d2a714bb7 100644--- a/resources/views/partials/forms/edit/datepicker.blade.php+++ b/resources/views/partials/forms/edit/datepicker.blade.php@@ -3,7 +3,7 @@{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}<div class="input-group col-md-4"><div class="input-group date" data-provide="datepicker" data-date-clear-btn="true" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old($fieldname, ($item->{$fieldname}) ? date('Y-m-d', strtotime($item->{$fieldname})) : '') }}" readonly style="background-color:inherit">+ <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old($fieldname, ($item->{$fieldname}) ? date('Y-m-d', strtotime($item->{$fieldname})) : '') }}" readonly style="background-color:inherit" maxlength="10"><span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span></div>{!! $errors->first($fieldname, '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}