A free open source IT asset/license management system
Fixed #18732 - use newer datepicker and wire up the today button for today’s date
snipeb4753e369cdd
diff --git a/resources/views/blade/input/datepicker.blade.php b/resources/views/blade/input/datepicker.blade.phpindex 0fe10c9334..b702e9c709 100644--- a/resources/views/blade/input/datepicker.blade.php+++ b/resources/views/blade/input/datepicker.blade.php@@ -7,7 +7,7 @@<!-- Datepicker --><div class="input-group date {{ $col_size_class }}"- data-provide="datepicker" data-date-today-highlight="true" data-date-language="{{ auth()->user()->locale }}" data-date-locale="{{ auth()->user()->locale }}" data-date-format="yyyy-mm-dd" data-date-autoclose="true" data-date-clear-btn="true" data-date-today-btn="true" {{ $end_date ? ' data-date-end-date=' . $end_date : '' }}>+ data-provide="datepicker" data-date-today-highlight="true" data-date-language="{{ auth()->user()->locale }}" data-date-locale="{{ auth()->user()->locale }}" data-date-format="yyyy-mm-dd" data-date-autoclose="true" data-date-clear-btn="true" data-date-today-btn="linked" {{ $end_date ? ' data-date-end-date=' . $end_date : '' }}><input type="text" placeholder="{{ trans('general.select_date') }}" value="{{ $value }}" maxlength="10" {{ $attributes->merge(['class' => 'form-control']) }} {{ $required=='1' ? 'required' : '' }}><span class="input-group-addon"><x-icon type="calendar" /></span>diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.phpindex 3808fcee34..592a257fa7 100755--- a/resources/views/hardware/bulk.blade.php+++ b/resources/views/hardware/bulk.blade.php@@ -55,61 +55,67 @@<!-- Purchase Date -->- <div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">- <label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>- <div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ old('purchase_date') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>- {!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}- </div>- <div class="col-md-5">- <label class="form-control">- <input type="checkbox" name="null_purchase_date" value="1">- {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}- </label>++ <div class="form-group{{ $errors->has('purchase_date') ? ' has-error' : '' }}">+ <label for="purchase_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.date') }}</label>+ <div class="col-md-4">+ <x-input.datepicker+ name="purchase_date"+ value="{{ old('purchase_date') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ </div>+ <div class="col-md-5">+ <label class="form-control">+ <input type="checkbox" name="null_purchase_date" value="1">+ {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}+ </label>+ </div></div>- </div>- <!-- Expected Checkin Date -->- <div class="form-group {{ $errors->has('expected_checkin') ? ' has-error' : '' }}">- <label for="expected_checkin" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>- <div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="expected_checkin" id="expected_checkin" value="{{ old('expected_checkin') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>-- {!! $errors->first('expected_checkin', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}- </div>- <div class="col-md-5">- <label class="form-control">- <input type="checkbox" name="null_expected_checkin_date" value="1">- {{ trans_choice('general.set_to_null', count($assets), ['selection_count' => count($assets)]) }}- </label>- </div>- </div>- <!-- EOL Date -->- <div class="form-group {{ $errors->has('asset_eol_date') ? ' has-error' : '' }}">- <label for="eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>- <div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="asset_eol_date" id="asset_eol_date" value="{{ old('asset_eol_date') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>- {!! $errors->first('asset_eol_date', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}+ <!-- Expected Checkin Date -->+ <div class="form-group{{ $errors->has('expected_checkin') ? ' has-error' : '' }}">+ <label for="expected_checkin" class="col-md-3 control-label">{{ trans('admin/hardware/form.expected_checkin') }}</label>+ <div class="col-md-4">+ <x-input.datepicker+ name="expected_checkin"+ value="{{ old('expected_checkin') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('expected_checkin', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ </div>+ <div class="col-md-5">+ <label class="form-control">+ <input type="checkbox" name="null_expected_checkin" value="1">+ {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}+ </label>+ </div></div>- <div class="col-md-5">- <label class="form-control">- <input type="checkbox" name="null_asset_eol_date" value="1">- {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}- </label>++ <!-- EOL Date -->++ <div class="form-group{{ $errors->has('asset_eol_date') ? ' has-error' : '' }}">+ <label for="asset_eol_date" class="col-md-3 control-label">{{ trans('admin/hardware/form.eol_date') }}</label>+ <div class="col-md-4">+ <x-input.datepicker+ name="asset_eol_date"+ value="{{ old('asset_eol_date') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('asset_eol_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ </div>+ <div class="col-md-5">+ <label class="form-control">+ <input type="checkbox" name="null_asset_eol_date" value="1">+ {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}+ </label>+ </div></div>- </div>- <div class="form-group">++ <div class="form-group"><div class="col-md-9 col-md-offset-3"><label class="form-control"><input type="checkbox" name="calc_eol" value="1">@@ -207,31 +213,30 @@</div><!-- Next audit Date -->- <div class="form-group {{ $errors->has('next_audit_date') ? ' has-error' : '' }}">- <label for="next_audit_date" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>- <div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>-- {!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true">- <i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}-- </div>- <div class="col-md-5">- <label class="form-control">- <input type="checkbox" name="null_next_audit_date" value="1">- {{ trans_choice('general.set_to_null', count($assets), ['selection_count' => count($assets)]) }}- </label>- </div>- <div class="col-md-8 col-md-offset-3">- <p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>+ <div class="form-group{{ $errors->has('next_audit_date') ? ' has-error' : '' }}">+ <label for="next_audit_date" class="col-md-3 control-label">{{ trans('general.next_audit_date') }}</label>+ <div class="col-md-4">+ <x-input.datepicker+ name="next_audit_date"+ value="{{ old('next_audit_date') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}+ </div>+ <div class="col-md-5">+ <label class="form-control">+ <input type="checkbox" name="null_next_audit_date" value="1">+ {{ trans_choice('general.set_to_null', count($assets),['selection_count' => count($assets)]) }}+ </label>+ </div>+ <div class="col-md-8 col-md-offset-3">+ <p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>+ </div></div>- </div>- <!-- Requestable -->++ <!-- Requestable --><div class="form-group {{ $errors->has('requestable') ? ' has-error' : '' }}"><div class="control-label col-md-3"><strong>{{ trans('admin/hardware/form.requestable') }}</strong>diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.phpindex bce2a162c6..2bf0796d86 100644--- a/resources/views/layouts/default.blade.php+++ b/resources/views/layouts/default.blade.php@@ -880,9 +880,34 @@{background-color: var(--box-bg) !important;/*color: var(--color-fg) !important;*/- color: contrast-color(var(--box-bg)) !important;+ color: var(--color-fg) !important;+ }++ /** this handles the arrows for the datepicker widget **/++ /** arrow on the bottom - bg color **/+ .datepicker-dropdown.datepicker-orient-top:after {+ border-top: 6px solid var(--box-bg);+ }++ /** arrow on the bottom - border color **/+ .datepicker-dropdown.datepicker-orient-top:before {+ border-top: 6px solid var(--color-bg);}+ /** arrow on the top - bg color **/+ .datepicker-dropdown:after {+ border-bottom: 6px solid var(--box-bg);+ }++ /** arrow on the top - border color **/+ .datepicker-dropdown:before {+ border-bottom: 7px solid var(--color-bg);+ }++ /** end handling arrows for the datepicker widget **/++.treeview-menu > li {background-color: #2c3b41;color: var(--sidenav-text-nohover-color) !important;diff --git a/resources/views/users/bulk-edit.blade.php b/resources/views/users/bulk-edit.blade.phpindex f41760b271..b5ef9a1715 100644--- a/resources/views/users/bulk-edit.blade.php+++ b/resources/views/users/bulk-edit.blade.php@@ -250,43 +250,46 @@<!-- Start Date -->- <div class="form-group {{ $errors->has('start_date') ? ' has-error' : '' }}">+ <div class="form-group{{ $errors->has('start_date') ? ' has-error' : '' }}"><label for="start_date" class="col-md-3 control-label">{{ trans('general.start_date') }}</label><div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.start_date') }}" name="start_date" id="start_date" value="{{ old('start_date') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>- {!! $errors->first('start_date', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}+ <x-input.datepicker+ name="start_date"+ value="{{ old('start_date') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('start_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}</div><div class="col-md-5"><label class="form-control">- <input type="checkbox" name="null_start_date" value="1" />+ <input type="checkbox" name="null_start_date" value="1">{{ trans_choice('general.set_to_null', count($users),['selection_count' => count($users)]) }}</label></div></div>+<!-- End Date -->- <div class="form-group {{ $errors->has('end_date') ? ' has-error' : '' }}">- <label for="end_date" class="col-md-3 control-label">{{ trans('general.end_date') }}</label>+ <div class="form-group{{ $errors->has('start_dateend_date') ? ' has-error' : '' }}">+ <label for="start_date" class="col-md-3 control-label">{{ trans('general.end_date') }}</label><div class="col-md-4">- <div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">- <input type="text" class="form-control" placeholder="{{ trans('general.end_date') }}" name="end_date" id="end_date" value="{{ old('end_date') }}">- <span class="input-group-addon"><x-icon type="calendar" /></span>- </div>- {!! $errors->first('end_date', '<span class="alert-msg"><i class="fas fa-times"></i> :message</span>') !!}+ <x-input.datepicker+ name="end_date"+ value="{{ old('end_date') }}"+ placeholder="{{ trans('general.select_date') }}"+ />+ {!! $errors->first('end_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}</div><div class="col-md-5"><label class="form-control">- <input type="checkbox" name="null_end_date" value="1" />+ <input type="checkbox" name="null_end_date" value="1">{{ trans_choice('general.set_to_null', count($users),['selection_count' => count($users)]) }}</label></div></div>- @foreach ($users as $user)+ @foreach ($users as $user)<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}">@endforeach</div> <!--/.box-body-->