+++ /dev/null
-[% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
-
- [% IF saved_message %]
- <p>[% saved_message %]</p>
- [% END %]
-
- <form method="post" action="am.pl">
-
- <input type="hidden" name="id" value="[% HTML.escape(id) %]">
-
- <input type="hidden" name="type" value="warehouse">
- <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
-
- <div class="listtop">[% IF id %]Edit Warehouse[% ELSE %]Add Warehouse[% END %]</div>
-
- <table border="0">
- <tr>
- <td align="right">Description</td>
- <td>
- <input name="description" size="60" value="[% HTML.escape(description) %]">
- <input type="hidden" name="orig_description" value="[% HTML.escape(description) %]">
- </td>
- </tr>
-
- <tr>
- <td align="right">Invalid</td>
- <td><input type="checkbox" name="invalid" value="1" [% IF invalid %]checked[% END %]></td>
- </tr>
-
- <tr>
- <td align="right">Number of new bins</td>
- <td><input name="number_of_new_bins"></td>
- </tr>
-
- <tr>
- <td align="right">Prefix for the new bins' names</td>
- <td><input name="prefix" value="Bin"></td>
- </tr>
- </table>
-
- <p>
- <input type="submit" class="submit" name="action" value="Save">
- [%- IF id %][%- UNLESS in_use %]
- <input type="submit" class="submit" name="action" value="Delete">
- [%- END %][%- END %]
- </p>
-
- </form>
-
- [% IF id %]
-
- <hr height="3">
-
- <div class="listtop">Edit Bins</div>
-
- [% UNLESS BINS.size %]
- <p>No bins have been added to this warehouse yet.</p>
-
- [% ELSE %]
-
- <p>
- Bins that have been used in the past cannot be deleted anymore. For these bins there's no checkbox in the "Delete" column.
- </p>
-
- <form method="post" action="am.pl">
-
- <input type="hidden" name="warehouse_id" value="[% HTML.escape(id) %]">
-
- <input type="hidden" name="type" value="bin">
- <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
-
- <table border="0">
- <tr>
- <th class="listheading">Delete</th><th class="listheading">Description</th>
- <th class="listheading">Delete</th><th class="listheading">Description</th>
- </tr>
- [%- SET row_odd = '1' %]
- [%- USE bin_it = Iterator(BINS) %]
- [%- FOREACH bin = bin_it %]
- [%- IF row_odd %]
- <tr>
- [%- END %]
-
- <td>[% IF bin.in_use %] [% ELSE %]<input type="checkbox" name="delete_[% bin_it.count %]" value="1">[% END %]</td>
- <td>
- <input type="hidden" name="id_[% bin_it.count %]" value="[% HTML.escape(bin.id) %]">
- <input name="description_[% bin_it.count %]" value="[% HTML.escape(bin.description) %]">
- </td>
-
- [%- SET end_tr = '0' %]
- [%- UNLESS row_odd %][%- SET end_tr = '1' %][%- END %]
- [%- IF bin_it.last %][%- SET end_tr = '1' %][%- END %]
- [%- IF end_tr %]
- </tr>
- [%- END %]
-
- [%- IF row_odd %][% SET row_odd = '0' %][% ELSE %][% SET row_odd = '1' %][% END %]
- [%- END %]
- </table>
-
- <input type="hidden" name="rowcount" value="[% BINS.size %]">
-
- <p><input type="submit" class="submit" name="action" value="Save"></p>
- </form>
-
- [% END %]
-
- [% END %]
-
-</body>
-</html>