1 [%- USE T8 %][%- USE LxERP %]
5 <p>[% saved_message %]</p>
10 <form method="post" action="[% HTML.escape(script) %]">
12 <input type="hidden" name="type" value="unit">
16 <th class="listtop" colspan="2">[% title %]</th>
22 [% LxERP.t8('All units have either no or exactly one base unit of which they are multiples.') %]
23 [% LxERP.t8('If you select a base unit then you also have to enter a factor.') %]
24 [% LxERP.t8('You have to define a unit as a multiple of a smaller unit.') %]
25 [% LxERP.t8('Therefore the definition of "kg" with the base unit "g" and a factor of 1000 is valid while defining "g" with a base unit of "kg" and a factor of "0.001" is not.') %]
31 <tr><th class="listtop">[% 'Add unit' | $T8 %]</th></tr>
36 <th align="right">[% 'Unit' | $T8 %]</th>
37 <td><input name="new_name" size="20" maxlength="20"></td>
40 <th align="right">[% 'Base unit' | $T8 %]</th>
42 <select name="new_base_unit">
43 [% FOREACH row = NEW_BASE_UNIT_DDBOX %]<option [% row.selected %]>[% row.name %]</option>[% END %]
48 <th align="right">[% 'Factor' | $T8 %]</th>
49 <td><input name="new_factor"></td>
52 [% FOREACH language = LANGUAGES %]
54 <th align="right">[% language.description %]</th>
55 <td><input name="new_localized_[% language.id %]" size="20" maxlength="20"></td>
56 <th align="right">[% 'Plural' | $T8 %]</th>
57 <td><input name="new_localized_plural_[% language.id %]" size="20" maxlength="20"></td>
62 <input type="submit" class="submit" name="action" value="[% 'Add' | $T8 %]">
67 <tr><th class="listtop">[% 'Edit units' | $T8 %]</th></tr>
71 [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
75 [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
79 [% 'You can declare different translations for singular and plural for each unit (e.g. "day" and "days).' | $T8 %]
83 <tr class="listheading">
84 <th width="32" align="center" valign="center"><img alt="[% 'up' | $T8 %]" src="image/up.png"><img alt="[% 'down' | $T8 %]" src="image/down.png"></th>
85 <th>[% 'Delete' | $T8 %]</th>
86 <th>[% 'Unit' | $T8 %]</th>
87 <th>[% 'Base unit' | $T8 %]</th>
88 <th>[% 'Factor' | $T8 %]</th>
89 [% FOREACH language = LANGUAGES %]
90 <th>[% language.description %]</th>
94 [% FOREACH row = UNITS %]
95 <tr class="listrow[% loop.count % 2 %]">
96 <td width="32" align="center" valign="center">[% IF loop.first %]<img src="image/transparent16x16.gif">[% ELSE %]<a href="[% updownlink %]&dir=up&name=[% HTML.url(row.name) %]"><img alt="[% 'up' | $T8 %]" src="image/up.png" border="0"></a>[% END %][% IF loop.last %]<img src="image/transparent16x16.gif">[% ELSE %]<a href="[% updownlink %]&dir=down&name=[% HTML.url(row.name) %]"><img alt="[% 'down' | $T8 %]" src="image/down.png" border="0"></a>[% END %]</td>
99 <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
100 <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
103 <td>[% HTML.escape(row.name) %]</td>
104 <td>[% IF row.base_unit %][% HTML.escape(row.base_unit) %][% ELSE %]---[% END %]</td>
105 <td>[% IF row.base_unit %][% HTML.escape(row.factor) %][% ELSE %]---[% END %]</td>
109 <td align="center"><input type="checkbox" name="delete_[% loop.count %]"></td>
111 <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
112 <input name="name_[% loop.count %]" size="10" maxlength="20" value="[% HTML.escape(row.name) %]">
115 <select name="base_unit_[% loop.count %]">
116 [% FOREACH option = row.BASE_UNIT_DDBOX %]<option [% option.selected %]>[% HTML.escape(option.name) %]</option>[% END %]
119 <td><input name="factor_[% loop.count %]" size="8" value="[% row.factor %]"></td>
122 [% FOREACH language = row.UNITLANGUAGES %]
124 [% 'singular first char' | $T8 %]:
125 <input name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" size="6" maxlength="20">
126 [% 'plural first char' | $T8 %]:
127 <input name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" size="6" maxlength="20">
132 [% IF loop.last %]<input type="hidden" name="rowcount" value="[% loop.count %]">[% END %]
136 <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">