1 [%- USE T8 %][%- USE LxERP %][% USE L %]
7 [% INCLUDE "common/flash.html" %]
11 <div class="col" style="width:30.0em">
12 [% PROCESS "am/_units_header_info.html" %]
15 <div class="col" style="width:30.0em">
17 [% 'Units that have already been used (e.g. for parts and services or in invoices or warehouse transactions) cannot be changed.' | $T8 %]
20 [% 'Units marked for deletion will be deleted upon saving.' | $T8 %]
23 [% 'You can declare different translations for singular and plural for each unit (e.g. "day" and "days).' | $T8 %]
30 <form method="post" action="[% HTML.escape(script) %]" id="form">
31 <input type="hidden" name="type" value="unit">
33 <table id="unit_list" class="tbl-list wi-moderate">
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>
45 [% 'Plural' | $T8 %]</th>
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>
55 <input type="hidden" name="unchangeable_[% loop.count %]" value="1">
56 <input type="hidden" name="old_name_[% loop.count %]" value="[% HTML.escape(row.name) %]">
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>
63 <input type="checkbox" name="delete_[% loop.count %]">
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">
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>
77 <input name="factor_[% loop.count %]" value="[% row.factor %]" maxlength="8" type="text" class="wi-verysmall numeric">
80 [% FOREACH language = row.UNITLANGUAGES %]
82 <input type="text" name="localized_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized) %]" maxlength="20" class="wi-mediumsmall">
85 <input type="text" name="localized_plural_[% language.idx %]_[% language.language_id %]" value="[% HTML.escape(language.localized_plural) %]" maxlength="20" class="wi-mediumsmall">
93 <input type="hidden" name="rowcount" value="[% UNITS.size %]">
97 [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]