1 [% USE HTML %]<div class="listtop">Step 2 of 3: Services</div>
3 <form name="Form" method="post" action="login.pl">
5 <input type="hidden" name="unit_type" value="service">
6 <input type="hidden" name="action" value="login">
7 <input type="hidden" name="action2" value="">
10 <p>[% saved_message %]</p>
13 <div class="subsubheading">Add unit</div>
16 For each unit there's either no or exactly one base unit. If you chose a base unit then you also have to chose a factor. That way the new unit will be defined as a multiple of the base unit. The base unit must be the "smaller" one. A factor may not be less than 1. Therefore you may define "kg" with the base unit "g" and a factor of "1", but not the other way round.
20 The following units exist already:
21 [% FOREACH row = NEW_BASE_UNIT_DDBOX %][% IF row.name %][% HTML.escape(row.name) %][% UNLESS loop.last %]; [% END %][% END %][% END %]
28 <th align="right">Unit</th>
29 <td><input name="new_name" size="20" maxlength="20"></td>
32 <th align="right">Base unit</th>
34 <select name="new_base_unit">
35 [% FOREACH row = NEW_BASE_UNIT_DDBOX %]<option [% row.selected %]>[% row.name %]</option>[% END %]
40 <th align="right">Factor</th>
41 <td><input name="new_factor"></td>
45 <input type="submit" onclick="document.Form.action2.value = 'add_unit'; document.Form.submit();" name="dummy" value="Add unit">
49 <div class="subsubheading">Assign new units</div>
52 The following units are unknown.
53 You have to chose which unit to save for each of them.
58 <th class="listheading">Current unit</th>
59 <th class="listheading">New unit</th>
62 [% FOREACH row = UNKNOWN_PART_UNITS %]
63 <tr class="listrow[% loop.count % 2 %]">
65 [% HTML.escape(row.name) %]
66 <input type="hidden" name="old_unit_[% loop.count %]" value="[% HTML.escape(row.name) %]">
69 <select name="new_unit_[% loop.count %]">
70 [% FOREACH row_new = row.NEW_UNITS %]<option>[% HTML.escape(row_new.name) %]</option>[% END %]
73 [% IF loop.last %]<input type="hidden" name="rowcount" value="[% loop.count %]">[% END %]
77 <input type="submit" onclick="document.Form.action2.value = 'assign_units'; document.Form.submit();" name="dummy" value="Assign units">