2 [% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
 
   5   <p>[% saved_message %]</p>
 
   8  <form method="post" action="am.pl">
 
  10   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
 
  12   <input type="hidden" name="type" value="warehouse">
 
  13   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
 
  15   <div class="listtop">[% IF id %][% 'Edit Warehouse' | $T8 %][% ELSE %][% 'Add Warehouse' | $T8 %][% END %]</div>
 
  19     <td align="right">[% 'Description' | $T8 %]</td>
 
  21      <input name="description" size="60" value="[% HTML.escape(description) %]">
 
  22      <input type="hidden" name="orig_description" value="[% HTML.escape(description) %]">
 
  27     <td align="right">[% 'Invalid' | $T8 %]</td>
 
  28     <td><input type="checkbox" name="invalid" value="1" [% IF invalid %]checked[% END %]></td>
 
  32     <td align="right">[% 'Number of new bins' | $T8 %]</td>
 
  33     <td><input name="number_of_new_bins"></td>
 
  37     <td align="right">[%- 'Prefix for the new bins\' names' | $T8 %]</td>
 
  38     <td><input name="prefix" value="[% 'Bin' | $T8 %]"></td>
 
  43    <input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
 
  44    [%- IF id %][%- UNLESS in_use %]
 
  45    <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
 
  55  <div class="listtop">[% 'Edit Bins' | $T8 %]</div>
 
  57  [% UNLESS BINS.size %]
 
  58  <p>[% 'No bins have been added to this warehouse yet.' | $T8 %]</p>
 
  63   [%- 'Bins that have been used in the past cannot be deleted anymore. For these bins there\'s no checkbox in the "Delete" column.' | $T8 %]
 
  66  <form method="post" action="am.pl">
 
  68   <input type="hidden" name="warehouse_id" value="[% HTML.escape(id) %]">
 
  70   <input type="hidden" name="type" value="bin">
 
  71   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
 
  75     <th class="listheading">[% 'Delete' | $T8 %]</th><th class="listheading">[% 'Description' | $T8 %]</th>
 
  76     <th class="listheading">[% 'Delete' | $T8 %]</th><th class="listheading">[% 'Description' | $T8 %]</th>
 
  78    [%- SET row_odd = '1' %]
 
  79    [%- USE bin_it = Iterator(BINS) %]
 
  80    [%- FOREACH bin = bin_it %]
 
  85     <td>[% IF bin.in_use %] [% ELSE %]<input type="checkbox" name="delete_[% bin_it.count %]" value="1">[% END %]</td>
 
  87      <input type="hidden" name="id_[% bin_it.count %]" value="[% HTML.escape(bin.id) %]">
 
  88      <input name="description_[% bin_it.count %]" value="[% HTML.escape(bin.description) %]">
 
  91     [%- SET end_tr = '0' %]
 
  92     [%- UNLESS row_odd %][%- SET end_tr = '1' %][%- END %]
 
  93     [%- IF bin_it.last %][%- SET end_tr = '1' %][%- END %]
 
  98    [%- IF row_odd %][% SET row_odd = '0' %][% ELSE %][% SET row_odd = '1' %][% END %]
 
 102   <input type="hidden" name="rowcount" value="[% BINS.size %]">
 
 104   <p><input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]"></p>