From 297a5a8896d2f8463fd90a392afe1ac3f0a698d3 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 27 Feb 2006 14:54:12 +0000 Subject: [PATCH] small tweaks. fixed bug in card creation git-svn-id: svn://svn.open-ils.org/ILS/trunk@3193 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/admin/adminlib.js | 6 ++++++ Open-ILS/xul/staff_client/server/patron/user_editor.js | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/admin/adminlib.js b/Open-ILS/xul/staff_client/server/admin/adminlib.js index 922a2e9cc0..7bf13ed7ad 100644 --- a/Open-ILS/xul/staff_client/server/admin/adminlib.js +++ b/Open-ILS/xul/staff_client/server/admin/adminlib.js @@ -8,6 +8,8 @@ var XML_TEXT_NODE = 3; var FETCH_ORG_UNIT = "open-ils.actor:open-ils.actor.org_unit.retrieve"; +function debug(str) { try { dump(str + '\n'); } catch(e){} } + function fetchUser(session) { if(session == null ) { cgi = new CGI(); @@ -25,6 +27,10 @@ function fetchUser(session) { function fetchFleshedUser(id) { if(id == null) return null; + var req = new Request( + 'open-ils.actor:open-ils.actor.user.fleshed.retrieve', SESSION, id ); + req.send(true); + return req.result(); } /** diff --git a/Open-ILS/xul/staff_client/server/patron/user_editor.js b/Open-ILS/xul/staff_client/server/patron/user_editor.js index 060b1325b9..06961c40ed 100644 --- a/Open-ILS/xul/staff_client/server/patron/user_editor.js +++ b/Open-ILS/xul/staff_client/server/patron/user_editor.js @@ -19,7 +19,8 @@ var deletedStatCats = {}; var cachedAddresses = {}; var deletedAddresses = {}; -var myPerms = [ 'CREATE_USER', 'UPDATE_USER', 'CREATE_PATRON_STAT_CAT_ENTRY_MAP' ]; +/* if they don't have these perms, they shouldn't be here */ +//var myPerms = [ 'CREATE_USER', 'UPDATE_USER', 'CREATE_PATRON_STAT_CAT_ENTRY_MAP' ]; var pages = [ 'uedit_userid', @@ -44,7 +45,7 @@ var pageFocus = [ var regexes = {}; regexes.phone = /\d{3}-\d{3}-\d{4}/; -regexes.email = /\w+\@\w+\.\w+/; +regexes.email = /.+\@.+\..+/; regexes.date = /^\d{4}-\d{2}-\d{2}/; regexes.isnum = /^\d+$/; @@ -64,7 +65,7 @@ function uEditInit() { function() { /* these can be asynch */ - fetchHighestPermOrgs( SESSION, USER.id(), myPerms ); + /*fetchHighestPermOrgs( SESSION, USER.id(), myPerms );*/ uEditFetchSurveys(); /* these have to be synchronous */ @@ -196,7 +197,7 @@ function uEditSaveUser() { function uEditCollectData() { - var card = null; + var card = null; if(patron == null) { patron = new au(); @@ -694,6 +695,7 @@ function uEditFleshCard(card) { card.id(-1); card.active(1); + card.isnew(1); return ""; } -- 2.43.2