LP#1284864 propagate patron barcode to advanced hold options
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / place_hold.tt2
index 390b9ea..5383753 100644 (file)
             <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();" 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 %]"/>
+            <input type="text" name="hold_usr" id="hold_usr_input" 
+              value="[% CGI.param('usr_barcode') | html %]"
+              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"
                     onchange="staff_hold_usr_input_disabler(this);"
@@ -66,7 +75,8 @@
                     [% END %]
                     [% IF NOT metarecords.disabled %]
                         [% IF CGI.param('hold_type') == 'T' AND hdata.record.metarecord %]
-                            <a href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
+                            <a  id='advanced_hold_link'
+                                href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
                                 [% l('Advanced Hold Options') %]</a>
                         [% END %]
                         [% IF hdata.metarecord_filters.formats.size OR # should this be size > 1