From 5bda73f151d9c1f2f0c43b41b291745c80c45830 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 8 Aug 2023 08:18:40 +0100 Subject: [PATCH 1/3] Ugh - messing with the blade layout Signed-off-by: snipe --- resources/views/settings/localization.blade.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/views/settings/localization.blade.php b/resources/views/settings/localization.blade.php index 6e126dee64..d7ec45a92c 100644 --- a/resources/views/settings/localization.blade.php +++ b/resources/views/settings/localization.blade.php @@ -38,7 +38,7 @@
-
+
@@ -52,17 +52,22 @@
+
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
-
+
{!! 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', '') !!} +
+ {!! $errors->first('time_display_format', '') !!} +
+

The date shown in the drop-down is just an example to display the different date formats. It is not meant to reflect today's date.

From bd4061e02355c05cb4ad3b7c47102e04552b1918 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 8 Aug 2023 08:18:56 +0100 Subject: [PATCH 2/3] Change text on dropdown Signed-off-by: snipe --- resources/macros/macros.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/macros/macros.php b/resources/macros/macros.php index 3f3c3c23f1..625984dafe 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -63,7 +63,7 @@ Form::macro('date_display_format', function ($name = 'date_display_format', $sel } $select = ''; From 9820ab34d70dcc3d8470107927ccdf28040e07f2 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 14 Aug 2023 22:44:29 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Use=20today=E2=80=99s=20date=20for=20date?= =?UTF-8?q?=20format=20selectlist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- resources/macros/macros.php | 6 +++--- resources/views/settings/localization.blade.php | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/macros/macros.php b/resources/macros/macros.php index 625984dafe..43dc2cc2e0 100644 --- a/resources/macros/macros.php +++ b/resources/macros/macros.php @@ -59,11 +59,11 @@ 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 = ''; foreach ($date_display_formats as $format => $date_display_format) { - $select .= ' '; + $select .= ' '; } $select .= ''; diff --git a/resources/views/settings/localization.blade.php b/resources/views/settings/localization.blade.php index d7ec45a92c..a74387b32d 100644 --- a/resources/views/settings/localization.blade.php +++ b/resources/views/settings/localization.blade.php @@ -58,17 +58,15 @@
{{ Form::label('time_display_format', trans('general.time_and_date_display')) }}
-
+
{!! 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', '
') !!} -
- {!! $errors->first('time_display_format', '') !!} -
-

The date shown in the drop-down is just an example to display the different date formats. It is not meant to reflect today's date.

-