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