Zeiterfassung: Elemente in Eingabemaske untereinander anordnen
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Thu, 29 Apr 2021 13:21:06 +0000 (15:21 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000 (17:25 +0200)
templates/webpages/time_recording/form.html

index 59c47fc..62e486f 100644 (file)
   [% L.hidden_tag('callback', FORM.callback) %]
 
   <table>
-    <thead class="listheading">
-      <tr>
-       [%- IF SELF.use_duration %]
-        <th>[% 'Date'     | $T8 %]</th>
-        <th>[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
-       [%- ELSE %]
-        <th>[% 'Start' | $T8 %]</th>
-        <th>[% 'End'   | $T8 %]</th>
-       [%- END %]
-        <th>[% 'Sales Order' | $T8 %]</th>
-        <th>[% 'Customer' | $T8 %]</th>
-        <th>[% 'Project' | $T8 %]</th>
-        <th>[% 'Article' | $T8 %]</th>
-        <th>[% 'Description' | $T8 %]</th>
-        <th>[% 'Mitarbeiter' | $T8 %]</th>
-      </tr>
-    </thead>
-    <tbody valign="top">
-      <tr>
-       [%- IF SELF.use_duration %]
-        <td>
-          [% P.date_tag('time_recording.date_as_date', SELF.time_recording.date_as_date, "data-validate"="required", "data-title"=LxERP.t8('Date')) %]<br>
-        </td>
-        <td>
-          [% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=15) %]
-        </td>
-       [%- ELSE %]
-        <td>
-          [% P.date_tag('start_date',  SELF.start_date, "data-validate"="required", "data-title"=LxERP.t8('Start date'), onchange='kivi.TimeRecording.set_end_date()') %]<br>
-          [% P.input_tag('start_time', SELF.start_time, type="time", "data-validate"="required", "data-title"=LxERP.t8('Start time')) %]
-          [% P.button_tag('kivi.TimeRecording.set_current_date_time("start")', LxERP.t8('now')) %]
-        </td>
-        <td>
-          [% P.date_tag('end_date',  SELF.end_date) %]<br>
-          [% P.input_tag('end_time', SELF.end_time, type="time") %]
-          [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
-        </td>
-       [%- END %]
-        <td>[% P.select_tag('time_recording.order_id', SELF.all_orders, default=SELF.time_recording.order_id, title_key='digest', with_empty=1, onchange='kivi.TimeRecording.order_changed(this.value)') %]</td>
-        <td>[% P.customer_vendor.picker('time_recording.customer_id', SELF.time_recording.customer_id, type='customer', style='width: 300px', "data-validate"="required", "data-title"=LxERP.t8('Customer')) %]</td>
-        <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
-        <td>[% P.select_tag('time_recording.part_id', SELF.all_time_recording_articles, default=SELF.time_recording.part_id, with_empty=1, value_key='id', title_key='description') %]</td>
-        <td>[% L.textarea_tag('time_recording.description', SELF.time_recording.description, wrap="soft", style="width: 350px; height: 150px", class="texteditor", "data-validate"="required", "data-title"=LxERP.t8('Description')) %]</td>
-        <td>
-          [%- IF SELF.can_edit_all -%]
-            [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
-                             default    => SELF.time_recording.staff_member_id,
-                             title_key  => 'safe_name',
-                             value_key  => 'id',
-                             style      => 'width: 200px') %]
-          [%- ELSE -%]
-            [% SELF.time_recording.staff_member.safe_name | html %]
-          [%- END -%]
-        </td>
-      </tr>
-    </tbody>
+   [%- IF SELF.use_duration %]
+    <tr>
+      <th align="right">[% 'Date' | $T8 %]</th>
+      <td>
+        [% P.date_tag('time_recording.date_as_date', SELF.time_recording.date_as_date, "data-validate"="required", "data-title"=LxERP.t8('Date')) %]<br>
+      </td>
+    </tr>
+    <tr>
+      <th align="right">[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
+      <td>
+        [% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=11) %]
+      </td>
+    </tr>
+   [%- ELSE %]
+    <tr>
+      <th align="right">[% 'Start' | $T8 %]</th>
+      <td>
+        [% P.date_tag('start_date',  SELF.start_date, "data-validate"="required", "data-title"=LxERP.t8('Start date'), onchange='kivi.TimeRecording.set_end_date()') %]
+        [% P.input_tag('start_time', SELF.start_time, type="time", "data-validate"="required", "data-title"=LxERP.t8('Start time')) %]
+        [% P.button_tag('kivi.TimeRecording.set_current_date_time("start")', LxERP.t8('now')) %]
+      </td>
+    </tr>
+    <tr>
+      <th align="right">[% 'End' | $T8 %]</th>
+      <td>
+        [% P.date_tag('end_date',  SELF.end_date) %]
+        [% P.input_tag('end_time', SELF.end_time, type="time") %]
+        [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
+      </td>
+    </tr>
+   [%- END %]
+    <tr></tr><tr></tr>
+    <tr>
+      <th align="right">[% 'Sales Order' | $T8 %]</th>
+      <td>[% P.select_tag('time_recording.order_id', SELF.all_orders, default=SELF.time_recording.order_id, title_key='digest', with_empty=1, style='width: 300px', onchange='kivi.TimeRecording.order_changed(this.value)') %]</td>
+    </tr>
+    <tr>
+      <th align="right">[% 'Customer' | $T8 %]</th>
+      <td>[% P.customer_vendor.picker('time_recording.customer_id', SELF.time_recording.customer_id, type='customer', style='width: 300px', "data-validate"="required", "data-title"=LxERP.t8('Customer')) %]</td>
+    </tr>
+    <tr>
+      <th align="right">[% 'Project' | $T8 %]</th>
+      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
+    </tr>
+    <tr></tr><tr></tr>
+    <tr>
+      <th align="right">[% 'Article' | $T8 %]</th>
+      <td>[% P.select_tag('time_recording.part_id', SELF.all_time_recording_articles, default=SELF.time_recording.part_id, with_empty=1, value_key='id', title_key='description', style='width: 300px') %]</td>
+    </tr>
+    <tr>
+      <th align="right">[% 'Description' | $T8 %]</th>
+      <td>[% L.textarea_tag('time_recording.description', SELF.time_recording.description, wrap="soft", style="width: 300px; height: 150px", class="texteditor", "data-validate"="required", "data-title"=LxERP.t8('Description')) %]</td>
+    </tr>
+    <tr>
+      <th align="right">[% 'Mitarbeiter' | $T8 %]</th>
+      <td>
+       [%- IF SELF.can_edit_all -%]
+        [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
+                        default    => SELF.time_recording.staff_member_id,
+                        title_key  => 'safe_name',
+                        value_key  => 'id',
+                        style      => 'width: 300px') %]
+       [%- ELSE -%]
+        [% SELF.time_recording.staff_member.safe_name | html %]
+       [%- END -%]
+      </td>
+    </tr>
   </table>
 
 </form>