LP#1757526: escape more catalog data (MFHD edition)
[working/Evergreen.git] / Open-ILS / src / templates / booking / return.tt2
1 [% WRAPPER "base.tt2" %]
2 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/[% ctx.skin %]/booking.css" />
3 <div id="auto_l10n_start_here">
4     <h1 class="booking AUTO_return_h1"></h1>
5     <div class="nice_vertical_padding" id="contains_barcode_control">
6         <form id="lookup" onsubmit="return act(this);">
7             <label for="barcode_type" class="AUTO_barcode_type"></label>
8             <select name="barcode_type" id="barcode_type"
9                 onchange="var b = this.form.barcode; b.focus(); b.select();">
10                 <option id="option_resource" value="resource"
11                     selected="selected" class="AUTO_resource"></option>
12                 <option id="option_patron" value="patron"
13                     class="AUTO_patron"></option>
14             </select>
15             <input id="barcode" name="barcode" />
16             <input type="submit" class="AUTO_ATTR_VALUE_go" />
17         </form>
18     </div>
19     <div class="nice_vertical_padding" id="contains_patron_info">
20         <div id="patron_info"></div>
21     </div>
22     <div class="nice_vertical_padding" id="contains_out_bresv">
23         <h3 class="booking AUTO_out_bresv"></h3>
24         <div class="AUTO_no_out_bresv" id="no_out_bresv"></div>
25         <table id="out_bresv" jsId="out_bresv"
26             dojoType="dojox.grid.DataGrid" query="{id: '*'}"
27             rowSelector="20px" autoHeight="true" width="auto">
28             <thead>
29                 <tr><!-- FIXME: i18n problem: init_auto_l10n() runs
30                         too late to take care of the below elements. -->
31                     <th width="35%" field="type">[% l('Title') %]</th>
32                     <th width="25%" field="resource">[% l('Barcode') %]</th>
33                     <th width="20%" field="pickup_time">[% l('Pickup time') %]</th>
34                     <th width="20%" field="end_time">[% l('Due time') %]</th>
35                 </tr>
36             </thead>
37         </table>
38         <div class="nice_vertical_padding" id="controls_out_bresv">
39             <form>
40                 <input type="button" id="return_button"
41                     class="AUTO_ATTR_VALUE_return"
42                     onclick="p.act_on_selected('return', 'out');" />
43             </form>
44         </div>
45     </div>
46     <div class="nice_vertical_padding" id="contains_in_bresv">
47         <hr />
48         <h3 class="booking AUTO_in_bresv"></h3>
49         <div class="AUTO_no_in_bresv" id="no_in_bresv"></div>
50         <table id="in_bresv" jsId="in_bresv"
51             dojoType="dojox.grid.DataGrid" query="{id: '*'}"
52             rowSelector="20px" autoHeight="true" width="auto">
53             <thead>
54                 <tr><!-- FIXME: i18n problem: init_auto_l10n() runs
55                         too late to take care of the below elements. -->
56                     <th width="35%" field="type">[% l('Title') %]</th>
57                     <th width="25%" field="resource">[% l('Barcode') %]</th>
58                     <th width="20%" field="due_time">[% l('Due time') %]</th>
59                     <th width="20%" field="return_time">[% l('Return time') %]</th>
60                 </tr>
61             </thead>
62         </table>
63     </div>
64     <div class="nice_vertical_padding" id="contains_misc_controls">
65         <hr />
66         <form>
67             <input type="button" class="AUTO_ATTR_VALUE_reset"
68                 onclick="p.reset();" />
69         </form>
70     </div>
71 </div>
72
73 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/common.js"></script>
74 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/populator.js"></script>
75 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/booking/return.js"></script>
76 <script type="text/javascript">
77     dojo.require("dojox.grid.DataGrid");
78     openils.Util.addOnLoad(my_init);
79
80     function act(f) {
81         var key = f.barcode_type.options[f.barcode_type.selectedIndex].value;
82         var obj = {};
83         obj[key] = f.barcode.value;
84         p.populate(obj);
85         return false; /* Always. */
86     }
87 </script>
88 [% END %]