TPAC - set autofocus to user input when placing holds in staff client user/bshum/tpac-hold-usr-autofocus-rel_2_3
authorBen Shum <bshum@biblio.org>
Sat, 2 Mar 2013 07:21:58 +0000 (02:21 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 21 May 2013 18:55:28 +0000 (14:55 -0400)
When placing holds in TPAC via the staff client, the focus had been on the
basic search field above. Change this to have autofocus on the input field
for the hold user by default.

This can potentially save staff from having to perform an extra click to
select the input field. Now they can immediately begin entering the barcode
of the user they plan to create a hold on behalf of.

Signed-off-by: Ben Shum <bshum@biblio.org>
Conflicts:
Open-ILS/src/templates/opac/parts/place_hold.tt2

Open-ILS/src/templates/opac/parts/place_hold.tt2
Open-ILS/src/templates/opac/place_hold.tt2

index 2066616..9a58f6d 100644 (file)
@@ -22,7 +22,7 @@
             <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();" onkeypress="return no_hold_submit(event)" /><br />
+            <input type="text" name="hold_usr" id="hold_usr_input" onchange="staff_hold_usr_barcode_changed();" onkeypress="return no_hold_submit(event)" autofocus /><br />
             <input type="hidden" id="staff_barcode" value="[% ctx.staff_recipient.card.barcode | html %]"/>
             <span>
                 <input type="radio" id="hold_usr_is_requestor"
index 3c8d89e..cee7c2d 100644 (file)
@@ -1,6 +1,9 @@
 [%  PROCESS "opac/parts/header.tt2";
     WRAPPER "opac/parts/base.tt2";
     INCLUDE "opac/parts/topnav.tt2";
+    IF ctx.is_staff;
+        basic_search = "f";
+    END;
     ctx.page_title = l("Place Hold") %]
     <div id="search-wrapper">
         [% INCLUDE "opac/parts/searchbar.tt2" %]