1 [% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
 
   4   <p>[% saved_message %]</p>
 
   7  <form method="post" action="am.pl">
 
   9   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
 
  11   <input type="hidden" name="type" value="warehouse">
 
  12   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
 
  14   <div class="listtop">[% IF id %]Edit Warehouse[% ELSE %]Add Warehouse[% END %]</div>
 
  18     <td align="right">Description</td>
 
  20      <input name="description" size="60" value="[% HTML.escape(description) %]">
 
  21      <input type="hidden" name="orig_description" value="[% HTML.escape(description) %]">
 
  26     <td align="right">Invalid</td>
 
  27     <td><input type="checkbox" name="invalid" value="1" [% IF invalid %]checked[% END %]></td>
 
  31     <td align="right">Number of new bins</td>
 
  32     <td><input name="number_of_new_bins"></td>
 
  36     <td align="right">Prefix for the new bins' names</td>
 
  37     <td><input name="prefix" value="Bin"></td>
 
  42    <input type="submit" class="submit" name="action" value="Save">
 
  43    [%- IF id %][%- UNLESS in_use %]
 
  44    <input type="submit" class="submit" name="action" value="Delete">
 
  54  <div class="listtop">Edit Bins</div>
 
  56  [% UNLESS BINS.size %]
 
  57  <p>No bins have been added to this warehouse yet.</p>
 
  62   Bins that have been used in the past cannot be deleted anymore. For these bins there's no checkbox in the "Delete" column.
 
  65  <form method="post" action="am.pl">
 
  67   <input type="hidden" name="warehouse_id" value="[% HTML.escape(id) %]">
 
  69   <input type="hidden" name="type" value="bin">
 
  70   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
 
  74     <th class="listheading">Delete</th><th class="listheading">Description</th>
 
  75     <th class="listheading">Delete</th><th class="listheading">Description</th>
 
  77    [%- SET row_odd = '1' %]
 
  78    [%- USE bin_it = Iterator(BINS) %]
 
  79    [%- FOREACH bin = bin_it %]
 
  84     <td>[% IF bin.in_use %] [% ELSE %]<input type="checkbox" name="delete_[% bin_it.count %]" value="1">[% END %]</td>
 
  86      <input type="hidden" name="id_[% bin_it.count %]" value="[% HTML.escape(bin.id) %]">
 
  87      <input name="description_[% bin_it.count %]" value="[% HTML.escape(bin.description) %]">
 
  90     [%- SET end_tr = '0' %]
 
  91     [%- UNLESS row_odd %][%- SET end_tr = '1' %][%- END %]
 
  92     [%- IF bin_it.last %][%- SET end_tr = '1' %][%- END %]
 
  97    [%- IF row_odd %][% SET row_odd = '0' %][% ELSE %][% SET row_odd = '1' %][% END %]
 
 101   <input type="hidden" name="rowcount" value="[% BINS.size %]">
 
 103   <p><input type="submit" class="submit" name="action" value="Save"></p>