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