} 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
);
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);
{},
{
'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();
['command'],
function() { alert($("commonStrings").getString('common.unimplemented')); }
],
+ 'cmd_verify_credentials' : [
+ ['command'],
+ function() {
+ xulG.verify_credentials(obj.patron);
+ }
+ ],
'patron_alert' : [
['render'],
function(e) {
<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" />
<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"