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();
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();
}
/**
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',
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+$/;
function() {
/* these can be asynch */
- fetchHighestPermOrgs( SESSION, USER.id(), myPerms );
+ /*fetchHighestPermOrgs( SESSION, USER.id(), myPerms );*/
uEditFetchSurveys();
/* these have to be synchronous */
function uEditCollectData() {
- var card = null;
+ var card = null;
if(patron == null) {
patron = new au();
card.id(-1);
card.active(1);
+ card.isnew(1);
return "";
}