Zeiterfassung: Eingabemaske und Bericht: Reihenfolge erst Projekt, dann Artikel
[kivitendo-erp.git] / templates / webpages / time_recording / form.html
1 [% USE L %]
2 [% USE P %]
3 [% USE T8 %]
4 [% USE LxERP %]
5 [% USE HTML %]
6
7 <h1>[% title %]</h1>
8
9 [%- INCLUDE 'common/flash.html' %]
10
11 <form method="post" action="controller.pl" id="form">
12   [% P.hidden_tag('id',       SELF.time_recording.id) %]
13   [% L.hidden_tag('callback', FORM.callback) %]
14
15   <table>
16     <thead class="listheading">
17       <tr>
18        [%- IF SELF.use_duration %]
19         <th>[% 'Date'     | $T8 %]</th>
20         <th>[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
21        [%- ELSE %]
22         <th>[% 'Start' | $T8 %]</th>
23         <th>[% 'End'   | $T8 %]</th>
24        [%- END %]
25         <th>[% 'Sales Order' | $T8 %]</th>
26         <th>[% 'Customer' | $T8 %]</th>
27         <th>[% 'Project' | $T8 %]</th>
28         <th>[% 'Article' | $T8 %]</th>
29         <th>[% 'Description' | $T8 %]</th>
30         <th>[% 'Mitarbeiter' | $T8 %]</th>
31       </tr>
32     </thead>
33     <tbody valign="top">
34       <tr>
35        [%- IF SELF.use_duration %]
36         <td>
37           [% P.date_tag('time_recording.date_as_date', SELF.time_recording.date_as_date, "data-validate"="required", "data-title"=LxERP.t8('Date')) %]<br>
38         </td>
39         <td>
40           [% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=15) %]
41         </td>
42        [%- ELSE %]
43         <td>
44           [% P.date_tag('start_date',  SELF.start_date, "data-validate"="required", "data-title"=LxERP.t8('Start date'), onchange='kivi.TimeRecording.set_end_date()') %]<br>
45           [% P.input_tag('start_time', SELF.start_time, type="time", "data-validate"="required", "data-title"=LxERP.t8('Start time')) %]
46           [% P.button_tag('kivi.TimeRecording.set_current_date_time("start")', LxERP.t8('now')) %]
47         </td>
48         <td>
49           [% P.date_tag('end_date',  SELF.end_date) %]<br>
50           [% P.input_tag('end_time', SELF.end_time, type="time") %]
51           [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
52         </td>
53        [%- END %]
54         <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>
55         <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>
56         <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
57         <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>
58         <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>
59         <td>
60           [%- IF SELF.can_edit_all -%]
61             [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
62                              default    => SELF.time_recording.staff_member_id,
63                              title_key  => 'safe_name',
64                              value_key  => 'id',
65                              style      => 'width: 200px') %]
66           [%- ELSE -%]
67             [% SELF.time_recording.staff_member.safe_name | html %]
68           [%- END -%]
69         </td>
70       </tr>
71     </tbody>
72   </table>
73
74 </form>