Zeiterfassung: Placeholder-String im Template ermitteln
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 09:01:59 +0000 (11:01 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 7 May 2021 09:03:57 +0000 (11:03 +0200)
SL/Controller/TimeRecording.pm
templates/webpages/time_recording/form.html

index d1120ce..d326522 100644 (file)
@@ -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 _format_total);
+use SL::Helper::Number qw(_round_number _parse_number);
 use SL::Helper::UserPreferences::TimeRecording;
 use SL::Locale::String qw(t8);
 use SL::ReportGenerator;
@@ -90,7 +90,6 @@ sub action_edit {
 
   $self->render('time_recording/form',
                 title  => t8('Time Recording'),
-                ZERO   => _format_total(0.00),
   );
 }
 
index 773512c..a75ec95 100644 (file)
@@ -24,9 +24,9 @@
       <th align="right">[% 'Duration' | $T8 %]</th>
       <td>
         [% 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 %]<sup>(1)</sup>
+           "data-validate"="number", "data-title"=LxERP.t8('h'),   "placeholder"=LxERP.format_amount(0.00, 2)) %] [% 'h'   | $T8 %]<sup>(1)</sup>
         [% 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 %]
+           "data-validate"="number", "data-title"=LxERP.t8('min'), "placeholder"="0"                         ) %] [% 'min' | $T8 %]
       </td>
     </tr>
    [%- ELSE %]