]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/place_hold.tt2
e4304bde3c6108faea82539c40c5a6709409e3a6
[Evergreen.git] / Open-ILS / web / templates / default / opac / parts / place_hold.tt2
1 [%  PROCESS "default/opac/parts/misc_util.tt2";
2     attrs = {marc_xml => ctx.marc_xml};
3     PROCESS get_marc_attrs args=attrs;
4 %]
5 <div>
6     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
7         [% IF ctx.hold_success %]
8         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
9         [% ELSIF ctx.hold_failed %]
10         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
11             [% IF ctx.hold_failed_event || ctx.hold_local_alert %]
12         <div>
13             <strong>[% l('Problem:') %]</strong>
14             <span title="[% ctx.hold_failed_event.textcode %]">
15                 <em>[% ctx.hold_failed_event.desc ||
16                         ctx.hold_failed_event.payload.fail_part ||
17                         ctx.hold_failed_event.textcode ||
18                         (ctx.hold_local_alert ?
19                             l("There is already a copy available at your local library") :
20                             l("Unknown problem")) %]
21             </span>
22             [% IF ctx.could_override %]
23             <p>
24                 <big>[% l("You have permission to place this hold anyway.") %]</big>
25                 <br />
26                 [% l("Click submit below to override the system's objection and place your hold.") %]
27             </p>
28             <form method="POST">
29                 <input type="hidden" type="name" name="override" value="1" />
30                 [% FOR k IN ctx.orig_params.keys %]
31                 <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
32                 [% END %]
33                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
34                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
35             </form>
36             [% END %]
37         </div>
38             [% END;
39         ELSIF ctx.hold_local_block;
40             l("There is already a copy available at your local library");
41         ELSE %]
42         <form method="POST">
43             <br/>
44             <input type="hidden" name="hold_target"
45                 value="[% CGI.param('hold_target') | html %]" />
46             <input type="hidden" name="hold_type"
47                 value="[% CGI.param('hold_type') | html %]" />
48             [%
49                 new_redirect_to = ctx.referer;
50                 IF new_redirect_to.match('redirect_to');
51                     new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
52                 ELSE;
53                     new_redirect_to = new_redirect_to | replace('^http:', 'https:');
54                 END;
55             %]
56             <input type="hidden" name="redirect_to"
57                 value="[% new_redirect_to | html %]" />
58             <h1>Place Hold</h1>
59             [% IF ctx.is_staff %]
60             <p class="staff-hold">
61                 <input type="radio" id="hold_usr_is_requestor_not"
62                     onchange="staff_hold_usr_input_disabler(this);"
63                     name="hold_usr_is_requestor" value="0" />
64                 <label for="hold_usr_is_requestor_not">
65                     [% l("Place hold for patron by barcode:") %]
66                 </label>
67                 <input type="text" name="hold_usr" id="hold_usr_input" /><br />
68                 <span>
69                     <input type="radio" id="hold_usr_is_requestor"
70                         onchange="staff_hold_usr_input_disabler(this);"
71                         name="hold_usr_is_requestor" value="1" />
72                     <label for="hold_usr_is_requestor">
73                         [% l("Place this hold for me ([_1] [_2])",
74                         ctx.user.first_given_name, ctx.user.family_name) %]
75                     </label>
76                 </span>
77             </p>
78             [% END %]
79             <p>
80                 [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
81                 You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
82                 If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
83                 [% END %]
84             </p>
85             <p>
86                 [% l('Pickup location:') %]
87                 [% PROCESS "default/opac/parts/org_selector.tt2";
88                     PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
89             </p>
90             <p>
91                 [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
92                 services, please select "Outreach" to have the item delivered
93                 during your scheduled visit.[% END %]
94             </p>
95             <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
96                 alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
97             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
98             <a href="javascript:history.go(-1);" id="holds_cancel"><img
99                 alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
100         </form>
101         <br /><br />
102         <p>
103             [% |l %]* If you need your item today, and it is checked in at your
104             library, please place your hold and then call your library to set it
105             aside. Placing a hold without calling the library will increase your
106             wait time.[% END %]
107             <br /><a href="#">[% l('Library phone numbers.') %]</a>
108         </p>
109         <p>
110             [% |l %]* For best possible service, we recommend keeping 
111             a printed copy of your most recent holds list.[% END %]
112         </p>
113         [% END %] <!-- ctx.hold_success -->
114         <table width='90%' border="1" class="hide_me">
115             <tbody>
116                 <tr>
117                     <td class='holds_cell color_1' 
118                         align='center' colspan='2'>[% l("Create / Edit a Hold") %]</td>
119                 </tr>
120                 <tr>
121                     <td class='holds_cell'>[% l("Recipient") %]:</td>
122                     <td class='holds_cell' id='holds_recipient'> </td>
123                 </tr>
124                 <tr>
125                     <td class='holds_cell'>[% l("Title:") %]</td>
126                     <!-- <td class='holds_cell' id='holds_title'> </td> -->
127                 </tr>
128                 <tr>
129                     <td class='holds_cell'>[% l("Author") %]</td>
130                     <td class='holds_cell' id='holds_author'> </td>
131                 </tr>
132                 <tr>
133                     <td class='holds_cell'>[% l("Format") %]</td>
134                     <td class='holds_cell' id='holds_format'> </td>
135                 </tr>
136                 <tr id='hold_physical_desc_row'>
137                     <td class='holds_cell'>[% l("Physical Description:") %]</td>
138                     <td class='holds_cell' id='holds_physical_desc'> </td>
139                 </tr>
140
141                 <tr class='hide_me' id='holds_cn_row'>
142                     <td class='holds_cell'>[% l("Call Number:") %]</td>
143                     <td class='holds_cell'><b id='holds_cn'/> </td>
144                 </tr>
145
146                 <tr class='hide_me' id='holds_copy_row'>
147                     <td class='holds_cell'>[% l("Copy Barcode:") %]</td>
148                     <td class='holds_cell'><b id='holds_copy'/> </td>
149                 </tr>
150
151                 <tr class='hide_me' id='holds_type_row'>
152                     <td class='holds_cell'>[% l("Hold Type:") %]</td>
153                     <td class='holds_cell hide_me' id='holds_is_cn'>
154                         <b>[% l("Volume Hold") %]</b>
155                     </td>
156                     <td class='holds_cell hide_me' id='holds_is_copy'>
157                         <b>[% l("Copy Hold") %]</b>
158                     </td>
159                 </tr>
160                 <tr>
161                     <td class='holds_cell'>[% l("Contact telephone number") %]:</td>
162                     <td class='holds_cell'>
163                         <input id='holds_phone' size='13' maxlength='12'/>
164                         <span style='margin-left: 4px; font-size: 7pt;'>
165                             [% l("(XXX-YYY-ZZZZ)") %]
166                         </span>
167                     </td>
168                 </tr>
169                 <tr>
170                     <td class='holds_cell'>[% l("Enable phone notifications for this hold?") %]</td>
171                     <td class='holds_cell'>
172                         <input type='checkbox' id='holds_enable_phone'
173                             checked='checked' />
174                     </td>
175                 </tr>
176                 <tr>
177                     <td class='holds_cell'>[% l("Contact email address") %]:</td>
178                     <td class='holds_cell' id='holds_email'> 
179                         <span class='hide_me' id='holds.no_email'>
180                            ([% l("Patron has no configured email address") %])<br/>
181                            ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
182                         </span>
183                         <span class='hide_me' id='holds.no_email.xul'>
184                            [% l("(Patron has no configured email address)") %] 
185                         </span>
186                     </td>
187                 </tr>
188                 <tr>
189                     <td class='holds_cell'>[% l("Enable email notifications for this hold?") %]</td>
190                     <td class='holds_cell'>
191                         <input type='checkbox' id='holds_enable_email'
192                             checked='checked'/>
193                     </td>
194                 </tr>
195                 <!--
196                 <tr id='holds_depth_selector_row' class='hide_me'>
197                     <td class='holds_cell'>Hold Range</td>
198                     <td class='holds_cell'>
199                         <select id='holds_depth_selector'></select>
200                     </td>
201                 </tr>
202                 -->
203                 <tr>
204                     <td class='holds_cell'>[% l("Pickup location") %]</td>
205                     <td class='holds_cell'>
206                         <!-- <select id='holds_org_selector'> </select> -->
207                     </td>
208                 </tr>
209
210                 <tr>
211                     <td class='holds_cell'>[% l("Expiration date") %]</td>
212                     <td class='holds_cell'>
213                         <input size='10' maxlength='10'
214                          id='holds_expire_time' />
215                     </td>
216                 </tr>
217
218                 <tr>
219                     <td class='holds_cell'>
220                         [% l("Suspend this hold") %]
221                         <a class='classic_link'
222                             href='#'>[% l("(Help)") %]</a>
223                         </td>
224                     <td class='holds_cell'>
225                         <input type='checkbox' id='holds_frozen_chkbox' /> 
226                     </td>
227                 </tr>
228                 <tr id='hold_frozen_thaw_row' class='hide_me'>
229                     <td class='holds_cell'>
230                         <!-- XXX TODO there used to be script here dealing with
231                         frozen holds -->
232                         [% l("Automatically activate hold on:") %]
233                     </td>
234                     <td class='holds_cell'>
235                         <input size='10' maxlength='10'
236                             id='holds_frozen_thaw_input' />
237                     </td>
238                 </tr>
239
240                 <tr id='holds_alt_formats_row_extras' class='hide_me'>
241                     <td colspan='2' align='center'>
242                         <div style='padding: 8px;'>
243                             <a class='classic_link' href='#'
244                                 style='padding: 5px;'>[% l("Advanced Hold Options") %]</a>
245                         </div>
246                     </td>
247                 </tr>
248
249                 <tr id='holds_alt_formats_row' class='hide_me'>
250
251                     <td class='holds_cell'>
252                         <div style='margin-bottom: 5px;'>
253                             <span>[% l("Acceptable Alternative Formats:") %] </span>
254                             <span><a class='classic_link red' href='#'>[% l("(Help)") %]</a></span>
255                         </div>
256                         <div>[% l("(control-click to select multiple formats)") %]</div>
257                     </td>
258
259                     <td class='holds_cell'>
260                         <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
261                             <option value='at'    class='hide_me'>[% l("Books") %]</option>
262                             <option value='at-d' class='hide_me'>[% l("Large Print Books") %]</option>
263                             <option value='i'        class='hide_me'>[% l("Audiobooks") %]</option>
264                             <option value='g'        class='hide_me'>[% l("Video Recordings") %]</option>
265                             <option value='j'        class='hide_me'>[% l("Music") %]</option>
266                         </select>
267                     </td>
268                 </tr>
269                 <tr>
270                     <td class='holds_cell' align='center' colspan='2'>
271                         <!-- <button id='holds_submit'>[% l("Place Hold") %]</button> -->
272                         <button class='hide_me' id='holds_update'>[% l("Update Hold") %]</button>
273                         <span style='padding: 20px;'> </span>
274                         <!-- <button id='holds_cancel'>[% l("Cancel") %]</button> -->
275                     </td>
276                 </tr>
277             </tbody>
278         </table>
279         <div class='hide_me' id='holds_success'>[% l("Hold was successfully placed") %]</div>
280         <div class='hide_me' id='holds_failure'>[% l("Hold was not successfully placed") %]</div>
281         <span class='hide_me' id='holds_bad_phone'>
282             [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
283         </span>
284         <span class='hide_me' id='hold_not_allowed'>
285             [% |l %]No items were found that could fulfill the requested holds.  
286                 It's possible that choosing a different format will result in a successful hold.  
287                 It is also possible that you have exceeded the number of allowable holds.  
288                 For further information, please consult your local librarian.[% END %]
289         </span>
290     </div>
291     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
292         <select id="holdsCacheSel" class="hide_me"></select><br />
293         <a href="#">Place hold on selected</a><br />
294         <a href="#">Remove selected</a>
295         
296         <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
297             style="margin-top:10px;">
298             <tr>
299                 <td width="1%" style="padding-left:10px;">
300                     <input type='checkbox' title='Select All'
301                         id='anon_selector' />
302                 </td>
303                 <td width="1%">
304                 </td>
305                 <td width="98%" style="padding-left:40px;">
306                     <strong>Title</strong>
307                 </td>
308             </tr>
309         </table>
310         <table width='100%' style="margin-left:7px;margin-bottom:10px;">
311             <thead>
312                 <tr><td width='20'></td><td width='30'></td><td></td></tr>
313             </thead>
314             <tbody id="anonListParent">
315                 <tr id="anonListTemp">
316                   <td><input type='checkbox' name='anon_selector' /></td>
317                   <td name="curr_row"></td>
318                   <td name="title"></td>
319                 </tr>
320             </tbody>
321         </table>
322         <a href="#">Back to search results</a>
323     </div>
324
325     <span class='hide_me' id='format_words'>
326         <span name='at'>[% l("Books") %]</span>
327         <span name='at-d'>[% l("Large Print Books") %]</span>
328         <span name='i'>[% l("Audiobooks") %]</span>
329         <span name='g'>[% l("Video Recordings") %]</span>
330         <span name='j'>[% l("Music") %]</span>
331         <span name='m'>[% l("Electronic Resources") %]</span>
332     </span>
333
334     <span class='hide_me' id='holds_explain_adv'>
335         [% |l %]If you wish to broaden the scope of your hold to include other versions of this title, 
336         select the formats that would be acceptable.  The first available copy will be sent to you.[% END %]
337     </span>
338
339     <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
340     <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
341     <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
342
343     <span id='hold_failed_patron_barred' class='hide_me'>
344         [% |l %]PATRON BARRED. Please see any notes in the "Staff Notes" section of your 
345         "My Account" page or contact your local library.[% END %]
346     </span>
347
348     <span id='invalid_hold' class='hide_me'>
349         [% |l %]This hold is no longer valid. It's likely that the target for the hold was 
350         deleted from the system.  Please cancel this hold and place a new one.[% END %]
351     </span>
352     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
353 </div>