another entry point for verify credentials, via patron sidebar. also disable some...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 22:22:36 +0000 (22:22 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 22:22:36 +0000 (22:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11678 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/main/verify_credentials.js
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/summary.js
Open-ILS/xul/staff_client/server/patron/summary.xul
Open-ILS/xul/staff_client/server/patron/summary_overlay.xul

index fd04fca..e11a41e 100644 (file)
@@ -69,7 +69,11 @@ function verify_init() {
                 } catch(E) {
                     alert(E);
                 }
-                document.getElementById('name_prompt').focus();
+                if (document.getElementById('name_prompt').disabled) {
+                    document.getElementById('password_prompt').focus();
+                } else {
+                    document.getElementById('name_prompt').focus();
+                }
             },
             false
         );
@@ -97,7 +101,16 @@ function verify_init() {
             false
         );
 
-        document.getElementById('name_prompt').focus();
+        if (xulG.barcode) {
+            document.getElementById('name_prompt').disabled = true;
+            document.getElementById('name_prompt').value = xulG.usrname;
+            document.getElementById('barcode_prompt').disabled = true;
+            document.getElementById('barcode_prompt').value = xulG.barcode;
+            document.getElementById('cmd_retrieve').setAttribute('disabled','true');
+            document.getElementById('password_prompt').focus();
+        } else {
+            document.getElementById('name_prompt').focus();
+        }
 
     } catch(E) {
         alert(E);
index e1913cd..36dc4ce 100644 (file)
@@ -365,7 +365,17 @@ patron.display.prototype = {
                                {},
                                {
                                        'barcode' : obj.barcode,
-                                       'id' : obj.id, 
+                                       'id' : obj.id,
+                    'verify_credentials' : function(patron) {
+                        var vframe = obj.right_deck.reset_iframe(
+                            urls.XUL_VERIFY_CREDENTIALS,
+                            {},
+                            {
+                                'barcode' : patron.card().barcode(),
+                                'usrname' : patron.usrname()
+                            }
+                        );
+                    }, 
                                        'on_finished' : function(patron) {
 
                                                obj.patron = patron; obj.controller.render();
index 3abfc26..43f8972 100644 (file)
@@ -35,6 +35,12 @@ patron.summary.prototype = {
                                                ['command'],
                                                function() { alert($("commonStrings").getString('common.unimplemented')); }
                                        ],
+                    'cmd_verify_credentials' : [
+                        ['command'],
+                        function() {
+                            xulG.verify_credentials(obj.patron);
+                        }
+                    ],
                                        'patron_alert' : [
                                                ['render'],
                                                function(e) {
index 24a7923..f5c9101 100644 (file)
@@ -70,6 +70,7 @@
        <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties" />
 
        <commandset id="patron_summary_cmds">
+        <command id="cmd_verify_credentials"/>
        </commandset>
 
        <box id="patron_summary_main" />
index 2a2f8c6..1a0d71c 100644 (file)
                <row id="pdsgr0">
                        <label id="PatronSummaryContact_library_card_label" class="text_left card label"
                                value="&staff.patron_display.library_card.label;"/>
-                       <label id="patron_card" class="card value" style="text-decoration: underline; color: blue; -moz-user-focus: normal;" onclick="try { copy_to_clipboard(event); } catch(E) { alert(E); }"/>
-                       <!--<textbox id="patron_card" class="plain" readonly="true" onclick="this.select()"/>-->
+                       <label id="patron_card" class="card value click_link" onclick="try { copy_to_clipboard(event); } catch(E) { alert(E); }"/>
+               </row>
+               <row id="pdsgr0a">
+            <button id="PatronSummary_verify_passwd_label" 
+                label="&staff.patron_display.verify_password.label;" accesskey="&staff.patron_display.verify_password.accesskey;"
+                command="cmd_verify_credentials"/>
+            <spacer/>
                </row>
                <row id="pdsgr1">
                        <label id="PatronSummaryContact_ident_label" class="text_left"