mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Merge pull request #13455 from snipe/fixes/confusion_around_localization_date
Fixed #13382 - confusion around localization date
This commit is contained in:
commit
d3fbbec92c
|
@ -59,9 +59,9 @@ Form::macro('date_display_format', function ($name = 'date_display_format', $sel
|
|||
];
|
||||
|
||||
foreach ($formats as $format) {
|
||||
$date_display_formats[$format] = Carbon::parse(date('Y').'-'.date('m').'-25')->format($format);
|
||||
$date_display_formats[$format] = Carbon::parse(date('Y-m-d'))->format($format);
|
||||
}
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:250px" aria-label="'.$name.'">';
|
||||
$select = '<select name="'.$name.'" class="'.$class.'" style="min-width:100%" aria-label="'.$name.'">';
|
||||
foreach ($date_display_formats as $format => $date_display_format) {
|
||||
$select .= '<option value="'.$format.'"'.($selected == $format ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"').'">'.$date_display_format.'</option> ';
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="box-body">
|
||||
|
||||
|
||||
<div class="col-md-11 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- Language -->
|
||||
<div class="form-group {{ $errors->has('site_name') ? 'error' : '' }}">
|
||||
|
@ -52,18 +52,21 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Date format -->
|
||||
<div class="form-group {{ $errors->has('time_display_format') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-5">
|
||||
{!! Form::date_display_format('date_display_format', Request::old('date_display_format', $setting->date_display_format), 'select2') !!}
|
||||
|
||||
{!! Form::time_display_format('time_display_format', Request::old('time_display_format', $setting->time_display_format), 'select2') !!}
|
||||
|
||||
{!! $errors->first('time_display_format', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{!! Form::time_display_format('time_display_format', Request::old('time_display_format', $setting->time_display_format), 'select2') !!}
|
||||
</div>
|
||||
|
||||
{!! $errors->first('time_display_format', '<div class="col-md-9 col-md-offset-3"><span class="alert-msg" aria-hidden="true">:message</span> </div>') !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Currency -->
|
||||
|
|
Loading…
Reference in a new issue