]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/am/edit_units.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / am / edit_units.html
1 [%- USE T8 %][%- USE LxERP %][% USE L %]
2 [% USE HTML %]
3 <h1>
4   [% title %]
5 </h1>
6
7 [% INCLUDE "common/flash.html" %]
8
9 <div class="wrapper">
10
11   <div class="col" style="width:30.0em">
12     [% PROCESS "am/_units_header_info.html" %]
13   </div>
14
15   <div class="col" style="width:30.0em">
16     <p>
17       [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
18     </p>
19     <p>
20       [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
21     </p>
22     <p>
23       [% 'You can declare different translations for singular and plural for each unit (e.g. &quot;day&quot; and &quot;days).' | $T8 %]
24     </p>
25   </div>
26 </div>
27
28 <div class="wrapper">
29
30   <form method="post" action="[% HTML.escape(script) %]" id="form">
31     <input type="hidden" name="type" value="unit">
32
33     <table id="unit_list" class="tbl-list wi-moderate">
34       <thead>
35         <tr>
36           <th class="center img"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
37           <th>[% 'Delete' | $T8 %]</th>
38           <th>[% 'Unit' | $T8 %]</th>
39           <th>[% 'Base unit' | $T8 %]</th>
40           <th>[% 'Factor' | $T8 %]</th>
41           [% FOREACH language = LANGUAGES %]
42           <th>[% language.description %]<br>
43           [% 'Singular' | $T8 %]</th>
44           <th><br>
45           [% 'Plural' | $T8 %]</th>
46           [% END %]
47         </tr>
48       </thead>
49       <tbody>
50         [% FOREACH row = UNITS %]
51         <tr id="unit_id_[% row.id %]">
52           <td class="center img dragdrop"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></td>
53         [% IF row.in_use %]
54           <td>
55             <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
56             <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
57           </td>
58           <td><span>[% HTML.escape(row.name) %]</span></td>
59           <td><span>[% IF row.base_unit %][% HTML.escape(row.base_unit) %][% ELSE %]---[% END %]</span></td>
60           <td class="numeric"><span>[% IF row.base_unit %][% HTML.escape(row.factor)    %][% ELSE %]---[% END %]</span></td>
61         [% ELSE %]
62           <td class="center">
63             <input type="checkbox" name="delete_[% loop.count %]">
64           </td>
65           <td>
66             <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
67             <input name="name_[% loop.count %]" value="[% HTML.escape(row.name) %]" maxlength="20" type="text" class="wi-small">
68           </td>
69           <td>
70             <select name="base_unit_[% loop.count %]" class="wi-small">
71               [% FOREACH option = row.BASE_UNIT_DDBOX %]
72                 <option [% option.selected %]>[% HTML.escape(option.name) %]</option>
73               [% END %]
74             </select>
75           </td>
76           <td>
77             <input name="factor_[% loop.count %]" value="[% row.factor %]" maxlength="8" type="text" class="wi-verysmall numeric">
78           </td>
79         [% END %]
80         [% FOREACH language = row.UNITLANGUAGES %]
81           <td>
82             <input type="text" name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" maxlength="20" class="wi-mediumsmall">
83           </td>
84           <td>
85             <input type="text" name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" maxlength="20" class="wi-mediumsmall">
86           </td>
87         [% END %]
88         </tr>
89         [% END %]
90       </tbody>
91     </table>
92
93     <input type="hidden" name="rowcount" value="[% UNITS.size %]">
94
95   </form>
96
97   [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]
98 </div>
99