]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/place_hold.tt2
TPAC: Address severe accessibility issues
[Evergreen.git] / Open-ILS / src / templates / opac / parts / place_hold.tt2
1 [%  PROCESS "opac/parts/misc_util.tt2";
2     PROCESS "opac/parts/hold_error_messages.tt2";
3 %]
4
5 <div id='holds_box' class='canvas' style='margin-top: 6px;'>
6     <h1>[% l('Place Hold') %]</h1>
7     <form method="post">
8         <input type="hidden" name="hold_type" value="[% CGI.param('hold_type') | html %]" />
9         [%  
10             redirect = CGI.param('hold_source_page') || CGI.param('redirect_to') || CGI.referer;
11             # since we have to be logged in to get this far, return to a secure page
12             redirect = redirect.replace('^http:', 'https:') 
13         %]
14         <input type="hidden" name="redirect_to" value="[% redirect | html %]" />
15
16         [% IF ctx.is_staff %]
17         <p class="staff-hold">
18             <input type="radio" id="hold_usr_is_requestor_not"
19                 onchange="staff_hold_usr_input_disabler(this);"
20                 name="hold_usr_is_requestor" value="0"
21                 />
22             <label for="hold_usr_is_requestor_not">
23                 [% l("Place hold for patron by barcode:") %]
24             </label>
25             <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onpaste="setTimeout(staff_hold_usr_barcode_changed,1);" onkeypress="return no_hold_submit(event)" /> <span id="patron_name"></span><span id="patron_usr_barcode_not_found" style="display: none">[% l('Patron barcode was not found') %]</span><br />
26             <input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
27             <span>
28                 <input type="radio" id="hold_usr_is_requestor"
29                     onchange="staff_hold_usr_input_disabler(this);"
30                     name="hold_usr_is_requestor" value="1" />
31                 <label for="hold_usr_is_requestor">
32                     [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
33                 </label>
34             </span>
35         </p>
36         [% END %]
37
38         <!-- loop through the holds and display status of request where appropriate -->
39         <table id='hold-items-list'>
40         [% FOR hdata IN ctx.hold_data;
41             attrs = {marc_xml => hdata.marc_xml};
42             PROCESS get_marc_attrs args=attrs %]
43             <tr>
44                 <td>
45                     <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
46                     <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
47                     [% IF hdata.parts %]
48                         [% IF hdata.parts.size > 0 %]
49                         <div style='padding-left: 10px'>
50                             <span><label for='select_hold_part'>[%
51                                 hdata.part_required ? l('Select a Part:') : l('Select a Part (optional):')
52                             %]</label></span>
53                             <select id='select_hold_part' name='part'>
54                                 [% IF !hdata.part_required %]
55                                 <option selected='selected' value=''>[% l('- All Parts -') %]</option>
56                                 [% END %]
57                                 [% FOR part IN hdata.parts %]
58                                 <option value='[% part.id %]'>[% part.label | html %]</option>
59                                 [% END %]
60                             </select>
61                         </div>
62                         [% ELSE %]
63                         <input type='hidden' name='part' value=''/>
64                         [% END %]
65                     [% END %]
66                 </td>
67             </tr>
68         [% END %]
69         </table>
70
71         <p>
72             [%- org_select_id = 'pickup_lib'; -%]
73             <label for="[% org_select_id %]'>[%l('Pickup location:') %]</label>
74             [% PROCESS "opac/parts/org_selector.tt2";
75                 INCLUDE build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id=org_select_id can_have_vols_only=1 %]
76         </p>
77         <p>
78             [% l('Notify when hold is ready for pickup?') %]
79             <blockquote>
80                 <input type="checkbox" id="email_notify" name="email_notify" value="t"
81                     [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]/>
82                     <label for="email_notify">[% l('Yes, by Email') %]</label><br/>
83                 <blockquote>
84                     [% l('Email Address:') %] <span name="email_address">[% ctx.user.email %]</span>
85                 </blockquote>
86                 [%- IF allow_phone_notifications == 'true' %]
87                 <input type="checkbox" id="phone_notify_checkbox" name="phone_notify_checkbox"
88                     [% IF ctx.default_phone_notify %]checked="checked"[% END %]/>
89                     <label for="phone_notify_checkbox">[% l('Yes, by Phone') %]</label><br/>
90                 <blockquote>
91                     <label>[% l('Phone Number:') %]<input type="text" name="phone_notify" [% setting = 'opac.default_phone';
92                     IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]'
93                     [%- ELSIF ctx.user.day_phone; %] value='[% ctx.user.day_phone | html %]' [% END %]/></label>
94                 </blockquote>
95                 [%- END -%]
96                 [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
97                 <input type="checkbox" id="sms_notify_checkbox" name="sms_notify_checkbox"
98                     [% IF ctx.default_sms_notify %]checked="checked"[% END %]/>
99                     <label for="sms_notify_checkbox">[% l('Yes, by Text Messaging') %]</label><br/>
100                 <blockquote>
101                     [% INCLUDE "opac/parts/sms_carrier_selector.tt2" %]<br/>
102                     [% INCLUDE "opac/parts/sms_number_textbox.tt2" %]<br/>
103                 </blockquote>
104                 [% END %]
105             </blockquote>
106         </p>
107         <input id="place_hold_submit" type="submit" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
108             alt="[% l('Submit') %]" class="opac-button" />
109         <input type="reset" name="cancel" onclick="javascript:history.go(-1);"
110             value="[% l('Cancel') %]" id="holds_cancel" class="opac-button" />
111     </form>
112 </div>
113