Added calendar icon for datepickers

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-18 18:24:26 +01:00
parent 0c09f2b2c0
commit 4d8904938d
17 changed files with 30 additions and 26 deletions

View file

@ -99,9 +99,9 @@ class IconHelper
return 'fas fa-tachometer-alt';
case 'info-circle':
return 'fas fa-info-circle';
case 'carat-right':
case 'caret-right':
return 'fa fa-caret-right';
case 'carat-up':
case 'caret-up':
return 'fa fa-caret-up';
case 'arrow-circle-right':
return 'fa fa-arrow-circle-right';
@ -117,6 +117,8 @@ class IconHelper
return 'fas fa-paperclip';
case 'more-info':
return 'far fa-life-ring';
case 'calendar':
return 'fas fa-calendar';
}
}

View file

@ -63,7 +63,7 @@
<div class="input-group col-md-3{{ (Helper::checkIfRequired($item, 'start_date')) ? ' required' : '' }}">
<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="start_date" id="start_date" value="{{ old('start_date', $item->start_date) }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('start_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
@ -78,7 +78,7 @@
<div class="input-group col-md-3{{ (Helper::checkIfRequired($item, 'completion_date')) ? ' required' : '' }}">
<div class="input-group date" data-date-clear-btn="true" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="completion_date" id="completion_date" value="{{ old('completion_date', $item->completion_date) }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('completion_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>

View file

@ -2,5 +2,6 @@
'type' => '',
'class' => '',
'style' => '',
'id' => '',
])
<i {{ $attributes->merge(['class' => Icon::icon($type).' '.$class]) }} {{ $attributes->merge(['style' => $style]) }} aria-hidden="true"></i>
<i {{ $attributes->merge(['class' => Icon::icon($type).' '.$class]) }} {{ $attributes->merge(['style' => $style]) }} {{ $attributes->merge(['id' => $id]) }} aria-hidden="true"></i>

View file

@ -109,7 +109,7 @@
<div class="col-md-8">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.next_audit_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $next_audit_date) }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<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>') !!}
<p class="help-block">{!! trans('general.next_audit_date_help') !!}</p>

View file

@ -42,7 +42,7 @@
<div class="col-md-8">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-end-date="0d" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="checkout_at" id="checkout_at" value="{{ old('checkout_at') }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('checkout_at', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
@ -56,7 +56,7 @@
<div class="col-md-8">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-start-date="0d" data-date-clear-btn="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"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<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>

View file

@ -60,7 +60,7 @@
<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"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<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>
@ -78,7 +78,7 @@
<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"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<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>') !!}
@ -178,7 +178,7 @@
<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"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('next_audit_date', '<span class="alert-msg" aria-hidden="true">

View file

@ -128,8 +128,9 @@
<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"><i class="fas fa-calendar"
aria-hidden="true"></i></span>
<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>

View file

@ -103,7 +103,7 @@
<div class="col-md-9 col-sm-9 col-md-offset-3">
<a id="optional_info" class="text-primary">
<i class="fa fa-caret-right fa-2x" id="optional_info_icon"></i>
<x-icon type="caret-right" class="fa-2x" id="optional_info_icon" />
<strong>{{ trans('admin/hardware/form.optional_infos') }}</strong>
</a>
@ -124,7 +124,7 @@
<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="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $item->next_audit_date) }}" readonly style="background-color:inherit" maxlength="10">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
</div>
<div class="col-md-8 col-md-offset-3">
@ -153,7 +153,7 @@
<div class="form-group">
<div class="col-md-9 col-sm-9 col-md-offset-3">
<a id="order_info" class="text-primary">
<i class="fa fa-caret-right fa-2x" id="order_info_icon"></i>
<x-icon type="caret-right" class="fa-2x" id="order_info_icon" />
<strong>{{ trans('admin/hardware/form.order_details') }}</strong>
</a>

View file

@ -70,7 +70,7 @@
<div class="col-md-9">
<div class="input-group date col-md-5" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-clear-btn="true">
<input type="text" class="form-control" placeholder="{{ trans('general.next_audit_date') }}" name="next_audit_date" id="next_audit_date" value="{{ old('next_audit_date', $next_audit_date) }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<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>

View file

@ -87,7 +87,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) ? $item->expiration_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('expiration_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
@ -101,7 +101,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) ? $item->termination_date->format('Y-m-d') : '') }}" maxlength="10">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('termination_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>

View file

@ -31,7 +31,7 @@
<div class="input-group col-md-4" style="padding-left: 0px;">
<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="default_values[{{ $field->id }}]" id="default-value{{ $field->id }}" value="{{ $field->defaultValue($model_id) }}">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
</div>

View file

@ -47,7 +47,7 @@
<div class="input-group col-md-5" style="padding-left: 0px;">
<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="{{ $field->db_column_name() }}" id="{{ $field->db_column_name() }}" readonly value="{{ old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))) }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
</div>

View file

@ -63,7 +63,7 @@
<div class="input-group col-md-5" style="padding-left: 0px;">
<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="{{ $field->db_column_name() }}" id="{{ $field->db_column_name() }}" readonly value="{{ old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))) }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
</div>

View file

@ -4,7 +4,7 @@
<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" maxlength="10">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first($fieldname, '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>

View file

@ -4,7 +4,7 @@
<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="asset_eol_date" id="asset_eol_date" readonly value="{{ old('asset_eol_date', optional($item->asset_eol_date)->format('Y-m-d') ?? $item->asset_eol_date ?? '') }}" style="background-color:inherit" />
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('asset_eol_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>

View file

@ -4,7 +4,7 @@
<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="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
<span class="input-group-addon"><x-icon type="calendar" /></span>
</div>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>

View file

@ -1,4 +1,4 @@
<a style="padding-left: 10px; font-size: 18px;" class="text-dark-gray hidden-print" data-trigger="focus" tabindex="0" role="button" data-toggle="popover" title="{{ trans('general.more_info') }}" data-placement="right" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Help Info Missing' }}">
<x-icon type="more-info" />
span class="sr-only">{{ trans('general.moreinfo') }}</span>
<span class="sr-only">{{ trans('general.moreinfo') }}</span>
</a>