[open-ils-commits] r11125 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/auth xul/staff_client/chrome/content/main xul/staff_client/chrome/locale/en-US xul/staff_client/chrome/skin
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 10 19:47:27 EST 2008
Author: phasefx
Date: 2008-11-10 19:47:26 -0500 (Mon, 10 Nov 2008)
New Revision: 11125
Added:
trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js
trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
trunk/Open-ILS/xul/staff_client/chrome/skin/global.css
Log:
interface for verifying login credentials
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2008-11-11 00:47:26 UTC (rev 11125)
@@ -39,6 +39,7 @@
<!ENTITY common.step6.label 'Step 6)'>
<!ENTITY common.username "Username">
<!ENTITY common.username.label "Username:">
+<!ENTITY common.barcode "Barcode">
<!ENTITY common.password "Password">
<!ENTITY common.refresh "Refresh">
<!ENTITY common.submit "Submit">
@@ -62,6 +63,7 @@
<!ENTITY common.login.accesskey "L">
<!ENTITY common.password.accesskey "P">
<!ENTITY common.username.accesskey "U">
+<!ENTITY common.barcode.accesskey "B">
<!ENTITY staff.about.title "About">
<!ENTITY staff.acp_label_barcode "Barcode">
<!ENTITY staff.acp_label_call_number "Call Number">
@@ -178,6 +180,10 @@
<!ENTITY staff.auth.submit_prompt.key "S">
<!ENTITY staff.auth.title "Evergreen Staff Client 3">
<!ENTITY staff.auth.version "Evergreen 0.1.0 20051202">
+<!ENTITY staff.auth.verify.caption "Verify Credentials">
+<!ENTITY staff.auth.verify.submit.label "Verify">
+<!ENTITY staff.auth.verify.submit.accesskey "V">
+
<!ENTITY staff.bills_current_payment_label "Current Payment">
<!ENTITY staff.bills_information "Information">
<!ENTITY staff.bills_interface_label "Bills">
@@ -692,6 +698,8 @@
<!ENTITY staff.main.menu.circ.reprint.label "Re-Print Last">
<!ENTITY staff.main.menu.circ.special.key "S">
<!ENTITY staff.main.menu.circ.special.label "Special Circulation">
+<!ENTITY staff.main.menu.circ.verify_credentials "Verify Credentials">
+<!ENTITY staff.main.menu.circ.verify_credentials.accesskey "V">
<!ENTITY staff.main.menu.edit.buckets.copies "Copy Buckets">
<!ENTITY staff.main.menu.edit.buckets.copies.accesskey "B">
<!ENTITY staff.main.menu.edit.buckets.key "B">
Added: trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js (rev 0)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.js 2008-11-11 00:47:26 UTC (rev 11125)
@@ -0,0 +1,57 @@
+function verify_init() {
+ try {
+ offlineStrings = document.getElementById('offlineStrings');
+
+ if (typeof JSAN == 'undefined') {
+ throw(
+ offlineStrings.getString('common.jsan.missing')
+ );
+ }
+
+ JSAN.errorLevel = "die"; // none, warn, or die
+ JSAN.addRepository('..');
+
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
+ XML_HTTP_SERVER = data.server_unadorned;
+
+ JSAN.use('util.network'); var net = new util.network();
+ document.getElementById('cmd_verify').addEventListener(
+ 'command',
+ function() {
+ try {
+ var req = net.simple_request(
+ 'AUTH_VERIFY_CREDENTIALS',
+ [
+ ses(),
+ document.getElementById('barcode_prompt').value,
+ document.getElementById('name_prompt').value,
+ hex_md5( document.getElementById('password_prompt').value )
+ ]
+ );
+
+ if (typeof req.ilsevent != 'undefined') { throw(req); }
+
+ var msg_area = document.getElementById('messages');
+ var desc = document.createElement('description'); msg_area.insertBefore(desc, msg_area.firstChild);
+ desc.setAttribute('class', String(req) == '1' ? 'success_text' : 'failure_text');
+ var text = document.createTextNode(
+ String(req) == '1' ?
+ offlineStrings.getString('menu.cmd_verify_credentials.correct_credentials') :
+ offlineStrings.getString('menu.cmd_verify_credentials.incorrect_credentials')
+ );
+ desc.appendChild(text);
+
+ } catch(E) {
+ alert(E);
+ }
+ document.getElementById('name_prompt').focus();
+ },
+ false
+ );
+
+ document.getElementById('name_prompt').focus();
+
+ } catch(E) {
+ alert(E);
+ }
+}
Added: trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul (rev 0)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/verify_credentials.xul 2008-11-11 00:47:26 UTC (rev 11125)
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Verify Credentials -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- PRESENTATION -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/auth.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window SYSTEM "chrome://open_ils_staff_client/locale/lang.dtd">
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+
+<window id="verify_win" onload="try { verify_init(); } catch(E) { alert(E); }"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+ <!-- BEHAVIOR -->
+ <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var G;</script>
+ <scripts id="openils_util_scripts">
+ <script type="text/javascript" src="../main/constants.js" />
+ <script type="text/javascript" src="../OpenILS/util/utils.js" />
+ <script type="text/javascript" src="../OpenILS/util/CGI.js" />
+ <script type="text/javascript" src="../OpenILS/util/md5.js" />
+ <script type="text/javascript" src="../OpenILS/util/JSON_v1.js" />
+ <script type="text/javascript" src="../OpenILS/util/RemoteRequest.js" />
+ <script type="text/javascript" src="../OpenILS/util/org_utils.js" />
+ <script type="text/javascript" src="../OpenILS/global_util.js" />
+ </scripts>
+
+ <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
+ <script type="text/javascript" src="chrome://open_ils_staff_client/content/auth/verify_credentials.js"/>
+
+ <messagecatalog id="authStrings" src="chrome://open_ils_staff_client/locale/auth.properties"/>
+ <messagecatalog id="offlineStrings" src="chrome://open_ils_staff_client/locale/offline.properties"/>
+
+ <commandset id="verify_cmds">
+ <command id="cmd_verify" />
+ </commandset>
+
+ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+ <!-- CONTENT -->
+ <groupbox id="verify_groupbox" flex="1" style="overflow: auto;">
+ <caption id="verify_caption" label="&staff.auth.verify.caption;"/>
+ <grid>
+ <columns> <column /> <column /> </columns>
+ <rows>
+ <row>
+ <label value="&common.username;" control="name_prompt" accesskey="&common.username.accesskey;"/>
+ <textbox id="name_prompt" value=""/>
+ </row>
+ <row>
+ <label value="&common.barcode;" control="barcode_prompt" accesskey="&common.barcode.accesskey;"/>
+ <textbox id="barcode_prompt" value=""/>
+ </row>
+ <row>
+ <label value="&common.password;" control="password_prompt" accesskey="&common.password.accesskey;"/>
+ <textbox id="password_prompt" value="" type="password"/>
+ </row>
+ <row>
+ <spacer />
+ <hbox>
+ <button id="submit_button" command="cmd_verify" label="&staff.auth.verify.submit.label;" accesskey="&staff.auth.verify.submit.accesskey;" />
+ </hbox>
+ </row>
+ </rows>
+ </grid>
+ <vbox id="messages" flex="1" class="my_overflow">
+ <label id="footer"/>
+ </vbox>
+ </groupbox>
+
+</window>
+
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2008-11-11 00:47:26 UTC (rev 11125)
@@ -26,6 +26,7 @@
'AUTH_COMPLETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.authenticate.complete' },
'AUTH_DELETE' : { 'app' : 'open-ils.auth', 'method' : 'open-ils.auth.session.delete' },
'AUTH_WORKSTATION' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.workstation.register' },
+ 'AUTH_VERIFY_CREDENTIALS' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.verify_user_password' },
'BILL_PAY' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.money.payment' },
'BILLING_TYPE_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.billing_type.retrieve.all', 'secure' : false },
'BLOB_AU_PARTS_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.retrieve.parts', 'cacheable' : true, 'ttl' : 120000 },
@@ -307,6 +308,7 @@
'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xhtml',
'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul',
'XUL_USER_BUCKETS' : '/xul/server/patron/user_buckets.xul',
+ 'XUL_VERIFY_CREDENTIALS' : 'chrome://open_ils_staff_client/content/auth/verify_credentials.xul',
'XUL_VOLUME_BUCKETS' : '/xul/server/cat/volume_buckets.xul',
'XUL_VOLUME_COPY_CREATOR' : '/xul/server/cat/volume_copy_creator.xul',
'XUL_VOLUME_EDITOR' : '/xul/server/cat/volume_editor.xul',
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2008-11-11 00:47:26 UTC (rev 11125)
@@ -452,6 +452,16 @@
}
],
+ 'cmd_verify_credentials' : [
+ ['oncommand'],
+ function() {
+ obj.set_tab(
+ obj.url_prefix(urls.XUL_VERIFY_CREDENTIALS),
+ { 'tab_name' : offlineStrings.getString('menu.cmd_verify_credentials.tabname') },
+ {}
+ );
+ }
+ ],
/* Cataloging Menu */
'cmd_z39_50_import' : [
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2008-11-11 00:47:26 UTC (rev 11125)
@@ -48,6 +48,7 @@
<command id="cmd_reprint" />
<command id="cmd_retrieve_last_patron" />
<command id="cmd_retrieve_last_record" />
+ <command id="cmd_verify_credentials" />
<command id="cmd_change_session" />
<command id="cmd_manage_offline_xacts" />
@@ -140,6 +141,7 @@
<menuseparator />
<menuitem label="&staff.main.menu.circ.barcode.show_item;" accesskey="&staff.main.menu.circ.barcode.show_item.accesskey;" key="copy-status-key" command="cmd_copy_status"/>
<menuitem label="&staff.main.menu.circ.barcode.retrieve_patron;" accesskey="&staff.main.menu.circ.barcode.retrieve_patron.accesskey;" key="circ-checkout-key" command="cmd_circ_checkout"/>
+ <menuitem label="&staff.main.menu.circ.verify_credentials;" accesskey="&staff.main.menu.circ.verify_credentials.accesskey;" command="cmd_verify_credentials"/>
<menuitem label="&staff.main.menu.replace_barcode.label;" command="cmd_replace_barcode"/>
<menuitem label="&staff.main.menu.circ.in_house.label;" accesskey="&staff.main.menu.circ.in_house.accesskey;" key="circ-in-house-use-key" command="cmd_in_house_use"/>
<menuseparator />
Modified: trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-11-11 00:47:26 UTC (rev 11125)
@@ -129,6 +129,9 @@
menu.cmd_extension_manager.tab=Extension Manager
menu.cmd_theme_manager.tab=Theme Manager
menu.cmd_shutdown.prompt=Exit Evergreen completely?
+menu.cmd_verify_credentials.tabname=Verify Credentials
+menu.cmd_verify_credentials.correct_credentials=Success testing credentials!
+menu.cmd_verify_credentials.incorrect_credentials=Failure testing credentials!
menu.spawn_search.msg=Editor would like to search for: %1$s
menu.close_all_tabs.error=Error closing all tabs
menu.new_tab.tab=Tab
Modified: trunk/Open-ILS/xul/staff_client/chrome/skin/global.css
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/skin/global.css 2008-11-10 22:38:39 UTC (rev 11124)
+++ trunk/Open-ILS/xul/staff_client/chrome/skin/global.css 2008-11-11 00:47:26 UTC (rev 11125)
@@ -19,6 +19,9 @@
.my_overflow { overflow: auto; }
+.success_text { color: green; }
+.failure_text { color: red; }
+
.text_left { text-align: left; }
.text_right { text-align: right; }
.text_center { text-align: center; }
More information about the open-ils-commits
mailing list