KMAIN-3: Autopopulate barcode from patron holds tab on staff place hold
authorBill Erickson <berickxx@gmail.com>
Wed, 29 Oct 2014 21:07:19 +0000 (17:07 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
    Cross-port: 09a9561

KCLS/openils/var/templates_kcls/opac/parts/place_hold.tt2

index 4ca9153..b7b1f61 100644 (file)
@@ -4,7 +4,7 @@
 
 <div id='holds_box' class='canvas' style='margin-top: 6px;'>
     <h1>[% l('Place Hold') %]</h1>
-    <form method="POST">
+    <form method="post">
         <input type="hidden" name="hold_type" value="[% CGI.param('hold_type') | html %]" />
         [%  
             redirect = CGI.param('hold_source_page') || CGI.param('redirect_to') || CGI.referer;
             <input type="radio" id="hold_usr_is_requestor_not"
                 onchange="staff_hold_usr_input_disabler(this);"
                 name="hold_usr_is_requestor" value="0"
-                [% IF ctx.patron_recipient; ' checked="checked"'; END %] />
+                />
             <label for="hold_usr_is_requestor_not">
                 [% l("Place hold for patron by barcode:") %]
             </label>
-            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" /><br />
+            <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)" autofocus /> <span id="patron_name"></span><span id="patron_usr_barcode_not_found" style="display: none">[% l('Patron barcode was not found') %]</span><br />
             <input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
             <span>
                 <input type="radio" id="hold_usr_is_requestor"
                     [% IF hdata.parts %]
                         [% IF hdata.parts.size > 0 %]
                         <div style='padding-left: 10px'>
-                            <span>[% hdata.part_required ? l('Select a Part:') : l('Select a Part (optional):') %]</span>
-                            <select name='part'>
+                            <span><label for='select_hold_part'>[%
+                                hdata.part_required ? l('Select a Part:') : l('Select a Part (optional):')
+                            %]</label></span>
+                            <select id='select_hold_part' name='part'>
                                 [% IF !hdata.part_required %]
                                 <option selected='selected' value=''>[% l('- All Parts -') %]</option>
                                 [% END %]
         </table>
 
         <p>
-            [% l('Pickup location:') %]
+            [%- org_select_id = 'pickup_lib'; -%]
+            <label for="[% org_select_id %]">[%l('Pickup location:') %]</label>
             [% PROCESS "opac/parts/org_selector.tt2";
-                INCLUDE build_org_selector name='pickup_lib' 
-                    value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 hold_pickup_lib=1 %]
+                INCLUDE build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id=org_select_id can_have_vols_only=1 %]
         </p>
 
         <p>
             services, please select "Outreach" to have the item delivered
             during your scheduled visit.[% END %]
         </p>
-
 <!-- 
-Not part of the KCLS skin.  Leaving it here in case they want to look at integration 
-
         <p>
-            [%# l('Notify when hold is ready for pickup?') %]
+            [% l('Notify when hold is ready for pickup?') %]
             <blockquote>
-                <input type="checkbox" name="email_notify" value="t"
-                    [% IF ctx.default_email_notify %]checked="checked"[% END %]/>
-                    [% l('Yes, by Email') %]<br/>
-                <input type="checkbox" name="phone_notify_checkbox"
+                <input type="checkbox" id="email_notify" name="email_notify" value="t"
+                    [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]/>
+                    <label for="email_notify">[% l('Yes, by Email') %]</label><br/>
+                <blockquote>
+                    [% l('Email Address:') %] <span name="email_address">[% ctx.user.email %]</span>
+                </blockquote>
+                [%- IF allow_phone_notifications == 'true' %]
+                <input type="checkbox" id="phone_notify_checkbox" name="phone_notify_checkbox"
                     [% IF ctx.default_phone_notify %]checked="checked"[% END %]/>
-                    [% l('Yes, by Phone') %]<br/>
+                    <label for="phone_notify_checkbox">[% l('Yes, by Phone') %]</label><br/>
                 <blockquote>
-                    [% l('Phone Number:') %]<input type="text" name="phone_notify" [% setting = 'opac.default_phone';
+                    <label>[% l('Phone Number:') %]<input type="text" name="phone_notify" [% setting = 'opac.default_phone';
                     IF ctx.user_setting_map.$setting; %] value='[% ctx.user_setting_map.$setting | html %]'
-                    [%- ELSIF ctx.user.day_phone; %] value='[% ctx.user.day_phone | html %]' [% END %]/>
+                    [%- ELSIF ctx.user.day_phone; %] value='[% ctx.user.day_phone | html %]' [% END %]/></label>
                 </blockquote>
+                [%- END -%]
                 [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
-                <input type="checkbox" name="sms_notify_checkbox"
+                <input type="checkbox" id="sms_notify_checkbox" name="sms_notify_checkbox"
                     [% IF ctx.default_sms_notify %]checked="checked"[% END %]/>
-                    [% l('Yes, by Text Messaging') %]<br/>
+                    <label for="sms_notify_checkbox">[% l('Yes, by Text Messaging') %]</label><br/>
                 <blockquote>
-                    [%# INCLUDE "opac/parts/sms_carrier_selector.tt2" %]<br/>
-                    [%# INCLUDE "opac/parts/sms_number_textbox.tt2" %]<br/>
+                    [% INCLUDE "opac/parts/sms_carrier_selector.tt2" %]<br/>
+                    [% INCLUDE "opac/parts/sms_number_textbox.tt2" %]<br/>
                 </blockquote>
                 [% END %]
             </blockquote>
         </p>
 -->
+        <input id="place_hold_submit" type="image" name="submit" value="[% l('Submit') %]" title="[% l('Submit') %]"
+            alt="[% l('Submit') %]" class="opac-button" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
 
-
-        <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-            alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+
         <a href="javascript:history.go(-1);" id="holds_cancel">
             <img alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" />
         </a>
     </form>
-    <br /><br />
+
     <p>
         [% |l %]* If you need your item today, and it is checked in at your
         library, please place your hold and then call your library to set it