From 124d274756c0873240074c85afc7a3961a680f08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 7 May 2021 10:24:03 +0200 Subject: [PATCH] Zeiterfassung: Dauer und Min mit Attribut Placeholder vorbelegen --- SL/Controller/TimeRecording.pm | 3 ++- templates/webpages/time_recording/form.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/Controller/TimeRecording.pm b/SL/Controller/TimeRecording.pm index d326522be..d1120ce72 100644 --- a/SL/Controller/TimeRecording.pm +++ b/SL/Controller/TimeRecording.pm @@ -17,7 +17,7 @@ use SL::DB::Project; use SL::DB::TimeRecording; use SL::DB::TimeRecordingArticle; use SL::Helper::Flash qw(flash); -use SL::Helper::Number qw(_round_number _parse_number); +use SL::Helper::Number qw(_round_number _parse_number _format_total); use SL::Helper::UserPreferences::TimeRecording; use SL::Locale::String qw(t8); use SL::ReportGenerator; @@ -90,6 +90,7 @@ sub action_edit { $self->render('time_recording/form', title => t8('Time Recording'), + ZERO => _format_total(0.00), ); } diff --git a/templates/webpages/time_recording/form.html b/templates/webpages/time_recording/form.html index 6dc8e6712..8bcc8d3d2 100644 --- a/templates/webpages/time_recording/form.html +++ b/templates/webpages/time_recording/form.html @@ -23,8 +23,8 @@ [% 'Duration' | $T8 %] - [% P.input_tag('duration_h', SELF.time_recording.duration_as_hours || '', size=4, class='numeric', "data-validate"="number", "data-title"=LxERP.t8('h')) %] [% 'h' | $T8 %](1) - [% P.input_tag('duration_m', SELF.time_recording.duration_as_minutes || '', size=4, class='numeric', "data-validate"="number", "data-title"=LxERP.t8('min')) %] [% 'min' | $T8 %] + [% P.input_tag('duration_h', SELF.time_recording.duration_as_hours || '', size=4, class='numeric', "data-validate"="number", "data-title"=LxERP.t8('h'), "placeholder"= ZERO) %] [% 'h' | $T8 %](1) + [% P.input_tag('duration_m', SELF.time_recording.duration_as_minutes || '', size=4, class='numeric', "data-validate"="number", "data-title"=LxERP.t8('min') "placeholder"="0") %] [% 'min' | $T8 %] [%- ELSE %] -- 2.20.1