[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3a7a4ad057cfdab823e2788cc0a872d32aba7207

Evergreen Git git at git.evergreen-ils.org
Mon Jul 30 15:35:07 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  3a7a4ad057cfdab823e2788cc0a872d32aba7207 (commit)
      from  5b83924a077b6d7306b6c2c1302d4e166206ef73 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3a7a4ad057cfdab823e2788cc0a872d32aba7207
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Sun Jul 29 12:49:20 2012 -0400

    New XUL user perm editor
    
    The xhtml one doesn't work in newer xulrunners.
    
    Also, as the same issue breaks the pre-2.0 user editor I have removed it
    outright, including taking a stab at removing old language strings.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 3fe1a14..4ad7f61 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -3311,12 +3311,17 @@
 <!ENTITY staff.patron.summary_overlay.group_tab.retrieve_patron.accesskey "">
 <!ENTITY staff.patron.user_buckets.stub_not_implemented "Just a stub, Not Yet Implemented">
 <!ENTITY staff.patron.user_edit.title "Evergreen User Editor">
+<!ENTITY staff.patron.user_edit.user_info.label "User Information">
 <!ENTITY staff.patron.user_edit.user_name.label "User Name:">
 <!ENTITY staff.patron.user_edit.barcode.label "Barcode:">
 <!ENTITY staff.patron.user_edit.firstname.label "First Name:">
 <!ENTITY staff.patron.user_edit.middlename.label "Middle Name:">
 <!ENTITY staff.patron.user_edit.lastname.label "Last Name:">
 <!ENTITY staff.patron.user_edit.working_location.label "Working Location">
+<!ENTITY staff.patron.user_edit.working_shortname.label "Shortname">
+<!ENTITY staff.patron.user_edit.working_name.label "Name">
+<!ENTITY staff.patron.user_edit.working_ou.label "Work OU?">
+<!ENTITY staff.patron.user_edit.permission_list.label "Permissions">
 <!ENTITY staff.patron.user_edit.permission.label "Permission">
 <!ENTITY staff.patron.user_edit.applied.label "Applied">
 <!ENTITY staff.patron.user_edit.depth.label "Depth">
@@ -3486,107 +3491,6 @@
 <!ENTITY staff.generic.list_actions.csv_to_file.accesskey "F">
 <!ENTITY staff.generic.list_actions.save_columns.label "Save List Configuration">
 <!ENTITY staff.generic.list_actions.save_columns.accesskey "S">
-<!ENTITY ev.staff.patron.ue_xhtml.ev_user_editor.label "Evergreen User Editor">
-<!ENTITY ev.staff.patron.ue_xhtml.welcome.label "Welcome ">
-<!ENTITY ev.staff.patron.ue_xhtml.view_errors.label "View Errors">
-<!ENTITY ev.staff.patron.ue_xhtml.user_id.label "1. User Identification">
-<!ENTITY ev.staff.patron.ue_xhtml.contact_info.label "2. Contact Info">
-<!ENTITY ev.staff.patron.ue_xhtml.addresses.label "3. Addresses">
-<!ENTITY ev.staff.patron.ue_xhtml.groups_permissions.label "4. Groups and Permissions">
-<!ENTITY ev.staff.patron.ue_xhtml.statistical_categories.label "5. Statistical Categories">
-<!ENTITY ev.staff.patron.ue_xhtml.surveys.label "6. Surveys">
-<!ENTITY ev.staff.patron.ue_xhtml.finish.label "7. Finish">
-<!ENTITY ev.staff.patron.ue_xhtml.loading_data.label "Loading data...">
-<!ENTITY ev.staff.patron.ue_xhtml.found_duplicate_patron.label "Number of possible duplicate patron(s):">
-<!ENTITY ev.staff.patron.ue_xhtml.barcode.label "Barcode">
-<!ENTITY ev.staff.patron.ue_xhtml.mark_lost.label "Mark Lost">
-<!ENTITY ev.staff.patron.ue_xhtml.username.label "Username">
-<!ENTITY ev.staff.patron.ue_xhtml.password.label "Password">
-<!ENTITY ev.staff.patron.ue_xhtml.reset.label "Reset">
-<!ENTITY ev.staff.patron.ue_xhtml.re_password.label "Password: ">
-<!ENTITY ev.staff.patron.ue_xhtml.verify_password.label "Verify Password">
-<!ENTITY ev.staff.patron.ue_xhtml.first_name.label "First Name">
-<!ENTITY ev.staff.patron.ue_xhtml.middle_name.label "Middle Name">
-<!ENTITY ev.staff.patron.ue_xhtml.last_name.label "Last Name">
-<!ENTITY ev.staff.patron.ue_xhtml.suffix.label "Suffix">
-<!-- Used in a selection list, the '-' at the start and end draws attention to the entry -->
-<!ENTITY ev.staff.patron.ue_xhtml.pick_suffix.label "- Pick -">
-<!ENTITY ev.staff.patron.ue_xhtml.dob.label "Date of Birth">
-<!ENTITY ev.staff.patron.ue_xhtml.primary_id_type.label "Primary Identification Type">
-<!ENTITY ev.staff.patron.ue_xhtml.primary_id.label "Primary Identification">
-<!ENTITY ev.staff.patron.ue_xhtml.parent_guardian.label "Parent or Guardian">
-<!ENTITY ev.staff.patron.ue_xhtml.email_address.label "Email Address">
-<!ENTITY ev.staff.patron.ue_xhtml.phone_example "Example: 123-456-7890 or 123-456-7890 ex123">
-<!ENTITY ev.staff.patron.ue_xhtml.daytime_phone.label "Daytime Phone">
-<!ENTITY ev.staff.patron.ue_xhtml.evening_phone.label "Evening Phone">
-<!ENTITY ev.staff.patron.ue_xhtml.other_phone.label "Other (Cell Phone)">
-<!ENTITY ev.staff.patron.ue_xhtml.home_library.label "Home Library">
-<!ENTITY ev.staff.patron.ue_xhtml.address.label "Address">
-<!ENTITY ev.staff.patron.ue_xhtml.in_city_limits.label "Within City Limits">
-<!ENTITY ev.staff.patron.ue_xhtml.county.label "County">
-<!ENTITY ev.staff.patron.ue_xhtml.valid.label "Valid">
-<!ENTITY ev.staff.patron.ue_xhtml.mailing_address.label "Mailing Address">
-<!ENTITY ev.staff.patron.ue_xhtml.physical_address.label "Physical Address">
-<!ENTITY ev.staff.patron.ue_xhtml.address_owned_by.label "Address is owned by">
-<!ENTITY ev.staff.patron.ue_xhtml.label.label "Label">
-<!ENTITY ev.staff.patron.ue_xhtml.zip.label "Zip">
-<!ENTITY ev.staff.patron.ue_xhtml.street1.label "Street 1">
-<!ENTITY ev.staff.patron.ue_xhtml.street2.label "Street 2">
-<!ENTITY ev.staff.patron.ue_xhtml.city.label "City">
-<!ENTITY ev.staff.patron.ue_xhtml.conuty.label "County">
-<!ENTITY ev.staff.patron.ue_xhtml.state.label "State">
-<!ENTITY ev.staff.patron.ue_xhtml.country.label "Country">
-<!ENTITY ev.staff.patron.ue_xhtml.profile_group.label "Profile Group">
-<!ENTITY ev.staff.patron.ue_xhtml.ue_addr_delete.label "Delete this Address">
-<!ENTITY ev.staff.patron.ue_xhtml.ue_addr_detach.label "Detach this Address">
-<!ENTITY ev.staff.patron.ue_xhtml.ue_addr_approve.label "Approve Pending Address">
-<!ENTITY ev.staff.patron.ue_xhtml.ue_addr_approve_confirm.label "Approve pending address?  This operation will be be instantaneous.">
-<!ENTITY ev.staff.patron.ue_xhtml.primary_ident_ssn_help.label "(XXX-YY-ZZZZ)">
-<!ENTITY ev.staff.patron.ue_xhtml.primary_ident_dl_help.label "(GA-123456789)">
-<!ENTITY ev.staff.patron.ue_xhtml.edit.label "Edit">
-<!-- Used in a selection list, the '-' at the start and end draws attention to the entry -->
-<!ENTITY ev.staff.patron.ue_xhtml.required.label " -- Required -- ">
-<!ENTITY ev.staff.patron.ue_xhtml.account_expiration_date.label "Account Expiration Date">
-<!ENTITY ev.staff.patron.ue_xhtml.net_access_level.label "Internet Access Level">
-<!ENTITY ev.staff.patron.ue_xhtml.active.label "Active">
-<!ENTITY ev.staff.patron.ue_xhtml.barred.label "Barred">
-<!ENTITY ev.staff.patron.ue_xhtml.juvenile.label "Juvenile">
-<!ENTITY ev.staff.patron.ue_xhtml.set_family_group_lead_account.label "Set as Family or Group Lead Account">
-<!ENTITY ev.staff.patron.ue_xhtml.claims_returned_count.label "Claims Returned Count">
-<!ENTITY ev.staff.patron.ue_xhtml.alert_message.label "Alert Message">
-<!ENTITY ev.staff.patron.ue_xhtml.stat_cat_name.label "Statistical Category Name">
-<!ENTITY ev.staff.patron.ue_xhtml.owner.label "Owner">
-<!ENTITY ev.staff.patron.ue_xhtml.value.label "Value">
-<!-- Used in a selection list, the '-' at the start and end draws attention to the entry -->
-<!ENTITY ev.staff.patron.ue_xhtml.none_selected.label " -- None Selected -- ">
-<!ENTITY ev.staff.patron.ue_xhtml.no_surveys_for_location.label "No surveys have been created for this location.">
-<!ENTITY ev.staff.patron.ue_xhtml.finishing_message.label "You are now ready to save the user to the database.<br/>To view or print a summary of the changes, click on the 'View Summary' link.<br/>To save the user, click on the 'Save User' button.">
-<!ENTITY ev.staff.patron.ue_xhtml.back.label "Back">
-<!ENTITY ev.staff.patron.ue_xhtml.forward.label "Forward">
-<!ENTITY ev.staff.patron.ue_xhtml.secondary_id_type.label "Secondary Identification Type">
-<!ENTITY ev.staff.patron.ue_xhtml.secondary_id.label "Secondary Identification">
-<!ENTITY ev.staff.patron.ue_xhtml.address_label.label "Address Label">
-<!ENTITY ev.staff.patron.ue_xhtml.mailing.label "Mailing">
-<!ENTITY ev.staff.patron.ue_xhtml.billing.label "Billing">
-<!ENTITY ev.staff.patron.ue_xhtml.profile.label "Profile">
-<!ENTITY ev.staff.patron.ue_xhtml.expire_date.label "Expire Date">
-<!ENTITY ev.staff.patron.ue_xhtml.family_lead_account.label "Family Lead Account">
-<!ENTITY ev.staff.patron.ue_xhtml.stat_categories.label "Statistical Categories">
-<!ENTITY ev.staff.patron.ue_xhtml.survey.label "Survey">
-<!ENTITY ev.staff.patron.ue_xhtml.question.label "Question">
-<!ENTITY ev.staff.patron.ue_xhtml.answer.label "Answer">
-<!ENTITY ev.staff.patron.ue_xhtml.claims_return_confirm.label "This will reset the claims returned count for this user. Are you sure you wish to perform this action?">
-<!ENTITY ev.staff.patron.ue_xhtml.unsaved_changes.label "You have unsaved changes.">
-<!ENTITY ev.staff.patron.ue_xhtml.xact_collision.label "It appears that someone else was also editing this user. Saving the user now will destroy their changes.  Click 'OK' to refresh the user and continue editing. Click 'Cancel' to do nothing. Note that you will not be able to save the user until this page has been refreshed.">
-<!ENTITY ev.staff.patron.ue_xhtml.no_profile.label "A profile group must be selected">
-<!ENTITY ev.staff.patron.ue_xhtml.print_page.label "Print Page">
-<!ENTITY ev.staff.patron.ue_xhtml.return_to_editor.label "Return to Editor">
-<!ENTITY ev.staff.patron.ue_xhtml.save_user.value "Save User">
-<!ENTITY ev.staff.patron.ue_xhtml.save_clone_user.value "Save and Clone User">
-<!ENTITY ev.staff.patron.ue_xhtml.cancel.value "Cancel">
-<!ENTITY ev.staff.patron.ue_xhtml.alert_message_reset.value "Clear">
-<!ENTITY ev.staff.patron.ue_xhtml.date_selector.label "Date selector">
-<!ENTITY ev.staff.patron.ue_xhtml.alias.label "Alias">
 <!ENTITY ui.circ.patron_summary.horizontal "GUI: Alternative Horizontal Patron Summary Panel">
 <!ENTITY ui.circ.patron_summary.horizontal.desc "This replaces the vertical Patron Summary Sidebar.">
 <!ENTITY ui.general.button_bar "GUI: Above-Tab Button Bar">
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
index d8f795e..d3eb6e2 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
@@ -459,7 +459,7 @@ var urls = {
     'XUL_PATRON_HORIZ_DISPLAY' : 'oils://remote/xul/server/patron/display_horiz.xul',
     'XUL_PATRON_EDIT' : 'oils://remote/eg/actor/user/register',
     'XUL_PATRONS_DUE_REFUNDS' : 'oils://remote/xul/server/admin/patrons_due_refunds.xul',
-    'XUL_USER_PERM_EDITOR' : 'oils://remote/xul/server/patron/user_edit.xhtml',
+    'XUL_USER_PERM_EDITOR' : 'oils://remote/xul/server/patron/user_edit.xul',
     'XUL_PATRON_HOLDS' : 'oils://remote/xul/server/patron/holds.xul',
     'XUL_PATRON_INFO_NOTES' : 'oils://remote/xul/server/patron/info_notes.xul',
     'XUL_PATRON_INFO_STAT_CATS' : 'oils://remote/xul/server/patron/info_stat_cats.xul',
diff --git a/Open-ILS/xul/staff_client/server/main/data.xul b/Open-ILS/xul/staff_client/server/main/data.xul
index f71b54f..f18146b 100644
--- a/Open-ILS/xul/staff_client/server/main/data.xul
+++ b/Open-ILS/xul/staff_client/server/main/data.xul
@@ -117,7 +117,6 @@
             //cache_me('/xul/server/patron/summary_overlay.xul','http'); 
             //cache_me('/xul/server/patron/barcode_entry.xul','http');
 
-            //cache_me('/xul/server/patron/ue.xhtml','http');
             //cache_me('/xul/server/admin/adminlib.js','http');
             //cache_me('/xul/server/admin/admin.css','http');
             //cache_me('/xul/server/patron/ue_config.js','http');
diff --git a/Open-ILS/xul/staff_client/server/patron/ue.js b/Open-ILS/xul/staff_client/server/patron/ue.js
deleted file mode 100644
index e029118..0000000
--- a/Open-ILS/xul/staff_client/server/patron/ue.js
+++ /dev/null
@@ -1,824 +0,0 @@
-var cgi                            = null;
-var clone                        = false;
-var patron                        = null;
-var counter                        = 0;
-var identTypesCache            = {};
-var statCatsCache                = {};
-var surveysCache                = {};
-var surveyQuestionsCache    = {};
-var surveyAnswersCache        = {};
-var userCache                    = {};
-var groupsCache                = {};
-var netLevelsCache            = {};
-var orgSettings             = [];
-//var guardianNote                = null;
-var uEditUsePhonePw = false;
-
-if(!window.xulG) var xulG = null;
-
-function $(id) { return document.getElementById(id); }
-
-/* fetch the necessary data to start off */
-function uEditInit() {
-
-    _debug('uEditInit(): ' + location.search);
-
-    cgi        = new CGI();
-    session    = cgi.param('ses'); 
-    if (xulG) if (xulG.ses) session = xulG.ses;
-    if (xulG) if (xulG.params) if (xulG.params.ses) session = xulG.params.ses;
-    clone        = cgi.param('clone'); 
-    if (xulG) if (xulG.clone) clone = xulG.clone;
-    if (xulG) if (xulG.params) if (xulG.params.clone) clone = xulG.params.clone;
-    if(!session) throw $("patronStrings").getString('web.staff.patron.ue.session_no_defined');
-
-    fetchUser(session);
-    $('uedit_user').appendChild(text(USER.usrname()));
-
-    setTimeout( function() { 
-        uEditBuild(); uEditShowPage('uedit_userid'); }, 20 );
-}
-
-function uEditSetUnload() {
-   _debug('setting window unload event');
-   /*
-   window.onbeforeunload = function(evt) { 
-      return $('ue_unsaved_changes').innerHTML; 
-   };
-   */
-}
-
-function uEditClearUnload() {
-   _debug('clearing window unload event');
-   /*
-   window.onbeforeunload = null;
-   */
-}
-
-/* ------------------------------------------------------------------------------ */
-/* Fetch code
-/* ------------------------------------------------------------------------------ */
-function uEditFetchIdentTypes() {
-    _debug("uEditFetchIdentTypes()");
-    var s = fetchXULStash(); 
-    if (typeof s.list != 'undefined') 
-        if (typeof s.list.cit != 'undefined') return s.list.cit;
-    var req = new Request(FETCH_ID_TYPES);
-    req.send(true);
-    return req.result();
-}
-
-function uEditFetchStatCats() {
-    _debug("uEditFetchStatCats()");
-    var s = fetchXULStash(); 
-    if (typeof s.list != 'undefined') 
-        if (typeof s.list.my_actsc != 'undefined') return s.list.my_actsc;
-    var req = new Request(SC_FETCH_ALL, SESSION);
-    req.send(true);
-    return req.result();
-}
-
-function uEditFetchSurveys() {
-    _debug("uEditFetchSurveys()");
-    var s = fetchXULStash(); 
-    if (typeof s.list != 'undefined') 
-        if (typeof s.list.asv != 'undefined') return s.list.asv;
-    var req = new Request(SV_FETCH_ALL, SESSION);
-    req.send(true);
-    return req.result();
-}
-
-function uEditFetchGroups() {
-    _debug("uEditFetchGroups()");
-    var s = fetchXULStash(); 
-    if (typeof s.tree != 'undefined') 
-        if (typeof s.tree.pgt != 'undefined') return s.tree.pgt;
-    var req = new Request(FETCH_GROUPS);
-    req.send(true);
-    return req.result();
-}
-
-function uEditFetchNetLevels() {
-    _debug("uEditFetchNetLevels()");
-    var s = fetchXULStash(); 
-    if (typeof s.list != 'undefined') 
-        if (typeof s.list.cnal != 'undefined') return s.list.cnal;
-    var req = new Request(FETCH_NET_LEVELS, SESSION);
-    req.send(true);
-    return req.result();
-}
-
-/* ------------------------------------------------------------------------------ */
-
-
-/*  
- * adds all of the group.application_perm's to the list 
- * provided by descending through the group tree 
- */
-function buildAppPermList(list, group) {
-    if(!group) return;
-    if(group.application_perm() ) 
-        list.push(group.application_perm());
-    for(i in group.children()) {
-        buildAppPermList(list, group.children()[i]);
-    }
-}
-
-/* fetches necessary objects and builds the UI */
-function uEditBuild() {
-
-    myPerms = ['BAR_PATRON', 'UNBAR_PATRON'];
-
-    /*  grab the groups before we check perms so we know what
-        application_perms to check */
-    var groups = uEditFetchGroups();
-    buildAppPermList(myPerms, groups);
-
-    // de-dupe the permission list
-    var perms = [];
-    for(var p in myPerms) 
-        if(perms.indexOf(myPerms[p]) == -1)
-           perms.push(myPerms[p]);
-    myPerms = perms;
-        
-    fetchHighestPermOrgs( SESSION, USER.id(), myPerms );
-
-    uEditBuildLibSelector();
-    var usr = cgi.param('usr'); 
-    if (xulG) if (xulG.usr) usr = xulG.usr;
-    if (xulG) if (xulG.params) if (xulG.params.usr) usr = xulG.params.usr;
-
-    orgSettings = fetchBatchOrgSetting(USER.ws_ou(), [
-        'global.juvenile_age_threshold',
-        'patron.password.use_phone'
-    ]);
-
-    uEditUsePhonePw = (orgSettings['patron.password.use_phone'] && 
-        orgSettings['patron.password.use_phone'].value);
-
-    patron = fetchFleshedUser(usr);
-    if(!patron) patron = uEditNewPatron(); 
-    
-    uEditDraw( 
-        uEditFetchIdentTypes(),
-        groups,
-        uEditFetchStatCats(),
-        uEditFetchSurveys(),
-        uEditFetchNetLevels()
-        );
-
-    if(patron.isnew()) {
-        if(clone) uEditClone(clone);
-        else uEditCreateNewAddr();
-
-    } else {
-
-        /* do we need to display the parent / gurdian field? */
-        uEditCheckDOB(uEditFindFieldByKey('dob'));
-
-        $('ue_barcode').disabled = true;
-        unHideMe($('ue_mark_card_lost'));
-        unHideMe($('ue_reset_pw'));
-        uEditCheckEditPerm();
-    }
-
-    uEditCheckBarredPerm();
-}
-
-function uEditCheckBarredPerm() {
-    if(PERMS['BAR_PATRON'] != -1) 
-        return;
-
-    if(isTrue(patron.barred()) && PERMS['UNBAR_PATRON'] != -1) 
-        return;
-
-    $('ue_barred').disabled = true;
-}
-
-
-/* if this user does not have permission to put users into
-    the edited users group, they do not have permission to 
-    edit this user */
-function uEditCheckEditPerm() {
-
-    var perm = uEditFindGroupPerm(groupsCache[patron.profile()]);    
-    /*
-    _debug("editing user with group app perm "+patron.profile()+' : '+
-        groupsCache[patron.profile()].name() +', and perm = ' + perm);
-        */
-
-    if(PERMS[perm] != -1) return;
-
-    /* we can edit our own account, but not others in our group */
-    if( patron.id() != USER.id() ){
-        _debug("we are not allowed to edit this user");
-    
-        $('ue_save').disabled = true;
-        $('ue_save_clone').disabled = true;
-        $('ue_mark_card_lost').disabled = true;
-        $('ue_reset_pw').disabled = true;
-    
-        uEditIterateFields(
-            function(f) {
-                if( f && f.widget && f.widget.node )
-                    f.widget.node.disabled = true;
-            }    
-        );    
-
-    }
-
-    var node = $('ue_profile').parentNode;
-    node.removeChild($('ue_profile'));
-    node.appendChild(elem('span',null,groupsCache[patron.profile()].name()));
-
-    var field = uEditFindFieldByKey('profile');
-    field.required = false;
-    removeCSSClass(field.widget.node, CSS_INVALID_DATA);
-    uEditCheckErrors();
-}
-
-
-/* creates a new patron object with card attached */
-var uEditCardVirtId = -1;
-function uEditNewPatron() {
-    var patron = new au(); 
-    patron.isnew(1);
-    patron.id(-1);
-    card = new ac();
-    card.id(uEditCardVirtId--);
-    card.isnew(1);
-    patron.card(card);
-    patron.cards([card]);
-    patron.net_access_level(defaultNetLevel);
-    patron.stat_cat_entries([]);
-    patron.survey_responses([]);
-    patron.addresses([]);
-    patron.home_ou(USER.ws_ou());
-    uEditMakeRandomPw(patron);
-    return patron;
-}
-
-function uEditMakeRandomPw(patron) {
-    if(uEditUsePhonePw) return;
-    var rand  = Math.random();
-    rand = parseInt(rand * 10000) + '';
-    while(rand.length < 4) rand += '0';
-    appendClear($('ue_password_plain'),text(rand));
-    unHideMe($('ue_password_gen'));
-    patron.passwd(rand);
-    return rand;
-}
-
-function uEditMakePhonePw() {
-    if(patron.passwd()) return;
-    if( (pw = patron.day_phone()) || 
-        (pw = patron.evening_phone()) || (pw = patron.other_phone()) ) {
-            pw = pw.substring(pw.length - 4); // this is iffy
-            uEditResetPw(pw);
-            appendClear($('ue_password_plain'), text(pw));
-            unHideMe($('ue_password_gen'));
-            patron.passwd(pw);
-    }
-}
-
-function uEditResetPw(pw) {
-    if(!pw) {
-        if(uEditUsePhonePw) {
-            if( (pw = patron.day_phone()) ||
-                (pw = patron.evening_phone()) || (pw = patron.other_phone()) ) {
-                    pw = pw.substring(pw.length - 4); // this is iffy
-                    uEditResetPw(pw);
-                        appendClear($('ue_password_plain'), text(pw));
-                        unHideMe($('ue_password_gen'));
-             }
-        } else {
-            pw = uEditMakeRandomPw(patron);
-        }
-        $('ue_password1').value = pw;
-        $('ue_password2').value = pw;
-        $('ue_password1').onchange();
-    }
-}
-
-
-function uEditClone(clone) {
-
-    var cloneUser = fetchFleshedUser(clone);
-    patron.usrgroup(cloneUser.usrgroup());
-
-    if( cloneUser.day_phone() ) {
-        $('ue_day_phone').value = cloneUser.day_phone();
-        $('ue_day_phone').onchange();
-    }
-
-    if( cloneUser.evening_phone() ) {
-        $('ue_night_phone').value = cloneUser.evening_phone();
-        $('ue_night_phone').onchange();
-    }
-
-    if( cloneUser.other_phone() ) {
-        $('ue_other_phone').value = cloneUser.other_phone();
-        $('ue_other_phone').onchange();
-    }
-
-    setSelector($('ue_org_selector'), cloneUser.home_ou());
-    setSelector($('ue_profile'), cloneUser.profile());
-
-    /* force the expire date to be set */
-    $('ue_profile').onchange();
-    $('ue_org_selector').onchange();
-
-    for( var a in cloneUser.addresses() ) {
-        var addr = cloneUser.addresses()[a];
-        if( cloneUser.mailing_address && 
-                addr.id() == cloneUser.mailing_address().id() )
-            patron.mailing_address(addr);
-        if( cloneUser.billing_address() &&
-                addr.id() == cloneUser.billing_address().id() )
-            patron.billing_address(addr);
-        patron.addresses().push(addr);
-    }
-
-    uEditBuildAddrs(patron);
-}
-
-
-/* Creates a new blank address, 
-    adds it to the user and the fields array */
-var uEditVirtualAddrId = -1;
-function uEditCreateNewAddr() {
-    var addr = new aua();
-
-    addr.id(uEditVirtualAddrId--);
-    addr.isnew(1);
-    addr.usr(patron.id());
-    addr.country(defaultCountry);
-
-    if(!patron.addresses()) 
-        patron.addresses([]);
-
-    if(patron.addresses().length == 0) {
-        patron.mailing_address(addr);
-        patron.billing_address(addr);
-    }
-
-    addr.valid(1);
-    addr.within_city_limits(1);
-
-    uEditBuildAddrFields(patron, addr);
-    patron.addresses().push(addr);
-    uEditIterateFields(function(f) { uEditCheckValid(f); });
-    uEditCheckErrors();
-}
-
-
-/* kicks off the UI drawing */
-function uEditDraw(identTypes, groups, statCats, surveys, netLevels ) {
-    hideMe($('uedit_loading'));
-    unHideMe($('ue_maintd'));
-
-    dataFields = [];
-    uEditDrawIDTypes(identTypes);
-    uEditDrawGroups(groups, null, null, true);
-    uEditDrawStatCats(statCats);
-    uEditDrawSurveys(surveys);
-    uEditDrawNetLevels(netLevels);
-    uEditDefineData(patron);
-
-    uEditIterateFields(function(f) { uEditActivateField(f) });
-    uEditIterateFields(function(f) { uEditCheckValid(f); });
-    uEditCheckErrors();
-}
-
-
-/** Applies the event handlers and sets the data for the field */
-function uEditActivateField(field) {
-
-    if( field.widget.id ) {
-        field.widget.node = $(field.widget.id);
-
-    } else {
-        field.widget.node = 
-            $n(field.widget.base, field.widget.name);
-    }
-
-    uEditSetOnchange(field);
-
-    if(field.widget.onblur) {
-        field.widget.node.onblur = 
-            function() { field.widget.onblur(field); };
-    }
-
-    field.widget.node.disabled = field.widget.disabled;
-    if(field.object == null) return;
-    var val = field.object[field.key]();
-    if(val == null) return;
-
-    if( field.widget.type == 'input' )
-        field.widget.node.value = val;
-
-    if( field.widget.type == 'select' )
-        setSelector(field.widget.node, val);
-
-    if( field.widget.type == 'checkbox' )
-        field.widget.node.checked = 
-            (val && val != 'f') ? true : false;
-
-    if( field.widget.onload ) 
-        field.widget.onload(val);
-}
-
-
-/* set up the onchange event for the field */
-function uEditSetOnchange(field) {
-    var func = function() {uEditOnChange( field );}
-    field.widget.node.onchange = func;
-
-    if(field.widget.type != 'select')
-        field.widget.node.onkeyup = func;
-}
-
-/* find the current value of the field object's widget */
-function uEditNodeVal(field) {
-    if(field.widget.type == 'input')
-        return field.widget.node.value;
-
-    if(field.widget.type == 'checkbox')
-        return field.widget.node.checked;
-
-    if(field.widget.type == 'select')
-        return getSelectorVal(field.widget.node);
-}
-
-
-/* update a field value */
-function uEditOnChange(field) {
-
-    var newval = uEditNodeVal(field);
-    field.object[field.key](newval);
-    field.object.ischanged(1);
-
-    if(field.widget.onpostchange)
-        field.widget.onpostchange(field, newval);
-
-    //_debug(field.key+' = '+newval);
-
-    uEditIterateFields(function(f) { uEditCheckValid(f); });
-    uEditCheckErrors();
-
-   uEditSetUnload();
-}
-
-
-function uEditCheckValid(field) {
-    var newval = uEditNodeVal(field);
-
-    if(newval) {
-
-        if(field.widget.regex) { 
-            if(newval.match(field.widget.regex)) 
-                removeCSSClass(field.widget.node, CSS_INVALID_DATA);
-            else
-                addCSSClass(field.widget.node, CSS_INVALID_DATA);
-
-        } else {
-            removeCSSClass(field.widget.node, CSS_INVALID_DATA);
-        }
-
-    } else {
-
-        if(field.required) {
-            addCSSClass(field.widget.node, CSS_INVALID_DATA);
-
-        } else {
-            removeCSSClass(field.widget.node, CSS_INVALID_DATA);
-        }
-    }
-
-}
-
-/* find a field object by object key */
-function uEditFindFieldByKey(key) {
-    var fields = grep( dataFields,
-        function(item) { return (item.key == key); });
-    return (fields) ? fields[0] : null;
-}
-
-/* find a list of fields by object key */
-function uEditFindFieldsByKey(key) {
-    return grep( dataFields,
-        function(item) { return (item.key == key); });
-}
-
-/* find a field object by widget id */
-function uEditFindFieldByWId(id) {
-    var fields = grep( dataFields,
-        function(item) { return (item.widget.id == id); });
-    return (fields) ? fields[0] : null;
-}
-
-
-function uEditIterateFields(callback) {
-    for( var f in dataFields ) 
-        callback(dataFields[f]);
-}
-
-
-function uEditGetErrorStrings() {
-    var errors = [];
-    uEditIterateFields(
-        function(field) { 
-            if(field.errkey) {
-                if( !field.object.isdeleted() ) {
-                    if( field.widget.node.className.indexOf(CSS_INVALID_DATA) != -1) {
-                        var str = $(field.errkey).innerHTML;
-                        if(str) errors.push(str);
-                    }
-                }
-            }
-        }
-    );
-
-    /* munge up something for all of the required surveys 
-        (which are not registered with the fields) */
-    if( patron.isnew() ) {
-        var sel = $('ue_survey_table');
-
-        if( sel ) {
-            var rows = sel.getElementsByTagName('tr');
-
-            for( var r in rows ) {
-        
-                var row = rows[r];
-                var sel = $n(row, 'ue_survey_answer');
-                if(!sel) continue;
-                var qstn = row.getAttribute('question');
-        
-                if(qstn) {
-                    qstn        = surveyQuestionsCache[qstn];
-                    survey    = surveysCache[qstn.survey()];
-                    var val    = getSelectorVal(sel);
-                    if(!val && isTrue(survey.required()))
-                        errors.push($('ue_bad_survey').innerHTML + ' : ' + qstn.question());
-                }
-            }
-        }
-    }
-
-    /* ------------------------------------------------------------ */
-
-    if(errors[0]) return errors;
-    return null;
-}
-
-function uEditAlertErrors() {
-    var errors = uEditGetErrorStrings();
-    if(!errors) return false;
-    alert(errors.join("\n"));
-    return true;
-}
-
-
-/* send the user to the database */
-function uEditSaveUser(cloneme) {
-
-    if(uEditGetErrorStrings()) {
-        uEditAlertErrors();
-        return;
-    }
-
-    /* null is unique in the db, but '' is not */
-    if( ! patron.ident_value() ) patron.ident_value(null);
-    //if( ! patron.ident_type2() ) patron.ident_type2(null);
-    if( ! patron.ident_value2() ) patron.ident_value2(null);
-    patron.ident_type2(null);
-
-    if(! patron.dob() ) patron.dob(null);
-
-    _debug("Saving patron with card: " + js2JSON(patron.card()));
-    _debug("Saving full patron: " + js2JSON(patron));
-
-    //for( var c in patron
-
-    var req = new Request(UPDATE_PATRON, SESSION, patron);
-    req.alertEvent = false;
-    req.send(true);
-    var newuser = req.result();
-
-   uEditClearUnload();
-
-    var evt;
-    if( (evt = checkILSEvent(newuser)) || ! newuser ) {
-        if(evt) {
-            evt = newuser;
-            if( evt.textcode == 'XACT_COLLISION' ) {
-                if( confirmId('ue_xact_collision') )
-                    location.href = location.href;
-                return;
-            }
-            var j = js2JSON(evt);
-            alert(j);
-            _debug("USER UPDATE FAILED:\n" + j);
-        }
-        return;
-    } 
-
-    alert($('ue_success').innerHTML);
-
-    if(cloneme) {
-        /* if the user we just created was a clone, and we want to clone it,
-        we really want to clone the original */
-        if( clone ) cloneme = clone;
-        else cloneme = newuser.id();
-    }
-
-
-    if( cloneme ) {
-
-        if(window.xulG &&
-            typeof window.xulG.spawn_editor == 'function' && 
-
-            !patron.isnew() ) {
-                _debug("xulG clone spawning new interface...");
-                var ses = cgi.param('ses'); 
-                if (xulG) if (xulG.ses) ses = xulG.ses;
-                if (xulG) if (xulG.params) if (xulG.params.ses) ses = xulG.params.ses;
-                window.xulG.spawn_editor({ses:ses,clone:cloneme});
-                uEditRefresh();
-
-        } else {
-
-            var href = location.href;
-            href = href.replace(/\&?usr=\d+/, '');
-            href = href.replace(/\&?clone=\d+/, '');
-            href += (href.match(/\?/) ? "&" : "?") + 'clone=' + cloneme;
-            location.href = href;
-        }
-
-    } else {
-
-        uEditRefresh();
-    }
-
-    uEditRefreshXUL(newuser);
-}
-
-
-function uEditRefreshXUL(newuser) {
-    if (window.xulG && typeof window.xulG.on_save == 'function') 
-        window.xulG.on_save(newuser);
-}
-
-function uEditRefresh() {
-    var href = location.href;
-    href = href.replace(/\&?clone=\d+/, '');
-    location.href = href;
-}
-
-
-function uEditCancel() {
-    var href = location.href;
-    href = href.replace(/\&?usr=\d+/, '');
-    href = href.replace(/\&?clone=\d+/, '');
-    var id = cgi.param('usr'); 
-    if (xulG) if (xulG.usr) id = xulG.usr;
-    if (xulG) if (xulG.params) if (xulG.params.usr) id = xulG.params.usr;
-    /* reload the current user if available */
-    if( id ) href += (href.match(/\?/) ? "&" : "?") + "usr=" + id;
-    location.href = href;
-}
-
-
-var uEditDupHashes = {};
-var uEditDupTemplate;
-
-function uEditRunDupeSearch(type, search_hash) {
-
-    if(!patron.isnew()) return;
-
-    _debug('dup search: ' + js2JSON(search_hash));
-
-    var req = new Request(PATRON_SEARCH, SESSION, search_hash);
-
-    var container = $('dup_div_container');
-    if(!uEditDupTemplate)
-        uEditDupTemplate = container.removeChild($('dup_div'));
-
-    /* clear any existing dups for this type */
-    iterate( container.getElementsByTagName('div'),
-        function(d) {
-            if( d.getAttribute('type') == type ) {
-                container.removeChild(d)
-                return;
-            }
-        }
-    );
-
-    req.callback(
-        function(r) {
-            uEditHandleDupResults( r.getResultObject(), search_hash, type, container );
-        }
-    );
-    req.send();
-}
-
-
-function uEditHandleDupResults(ids, search_hash, type, container) {
-
-    _debug('dup search results: ' + js2JSON(ids));
-
-    if(!(ids && ids[0]))  /* no results */
-        return uEditDupHashes[type] = null;
-
-    /* add a dup link to the UI and plug in the data */
-    var node = uEditDupTemplate.cloneNode(true);
-    container.appendChild(node);
-    node.setAttribute('type', type);
-
-    var link = $n(node, 'link');
-    link.setAttribute('type', type);
-    unHideMe(link);
-    $n(node,'count').appendChild(text(ids.length));
-
-    for( var o in search_hash ) 
-        $n(node, 'data').appendChild(
-            text(search_hash[o].value + ' '));
-
-    uEditDupHashes[type] = search_hash;
-
-    switch(type) {
-        case 'ident' :
-            if(confirm($('ue_dup_ident1').innerHTML)) 
-                uEditShowSearch(null, type);
-            break;
-    }
-}
-
-
-function uEditShowSearch(link,type) {
-    if(!type) type = link.getAttribute('type');
-    if(window.xulG)
-        window.xulG.spawn_search(uEditDupHashes[type]);    
-    else alert($("patronStrings").getString('web.staff.patron.ue.uedit_show_search.search_would_be', js2JSON(uEditDupHashes[type])));
-}
-
-function uEditMarkCardLost() {
-
-    for( var c in patron.cards() ) {
-
-        var card = patron.cards()[c];
-        if( patron.card().id() == card.id() ) {
-
-            /* de-activite the current card */
-            card.ischanged(1);
-            card.active(0);
-
-            if( !card.barcode() ) {
-                /* a card exists in the array with no barcode */
-                ueRemoveCard(card.id());
-
-            } else if( card.isnew() && card.active() == 0 ) {
-                /* a new card was created, then never used, removing.. */
-                _debug("removing new inactive card "+card.barcode());
-                ueRemoveCard(card.id());
-            }
-
-            /* create a new card for the patron */
-            var newcard = new ac();
-            newcard.id(uEditCardVirtId--);
-            newcard.isnew(1);
-            patron.card(newcard);
-            patron.cards().push(newcard);
-
-
-            /* reset the widget */
-            var field = uEditFindFieldByWId('ue_barcode');
-            field.widget.node.disabled = false;
-            field.widget.node.value = "";
-            field.widget.node.onchange();
-            field.object = newcard;
-            _debug("uEditMarkCardLost(): created new card object for user");
-        }
-    }
-}
-
-
-function ueRemoveCard(id) {
-    _debug("removing card from cards() array: " + id);
-    var cds = grep( patron.cards(), function(c){return (c.id() != id)});
-    if(!cds) cds = [];
-    for( var j = 0; j < cds.length; j++ )
-        _debug("patron card array now has :  "+cds[j].id());
-    patron.cards(cds);
-}
-
-
-
-function compactArray(arr) {
-    var a = [];
-    for( var i = 0; arr && i < arr.length; i++ ) {
-        if( arr[i] != null )
-            a.push(arr[i]);
-    }
-    return a;
-}
diff --git a/Open-ILS/xul/staff_client/server/patron/ue.xhtml b/Open-ILS/xul/staff_client/server/patron/ue.xhtml
deleted file mode 100644
index 60fe9a4..0000000
--- a/Open-ILS/xul/staff_client/server/patron/ue.xhtml
+++ /dev/null
@@ -1,1008 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-
-<!DOCTYPE html PUBLIC 
-    "-//W3C//DTD XHTML 1.0 Transitional//EN" 
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
-    <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-    <!ENTITY nbsp " "> <!-- calendar needs this entity -->
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
-
-    <head>
-        <title>&ev.staff.patron.ue_xhtml.ev_user_editor.label;</title>
-        <script language='javascript' src='/opac/common/js/utils.js'> </script>
-        <script language='javascript' src='/opac/common/js//config.js'> </script> 
-        <script language='javascript' src='/opac/common/js/CGI.js'> </script>
-    
-        <script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
-        <script language='javascript' src='/opac/common/js/fmall.js'> </script>
-        <script language='javascript' src='/opac/common/js/fmgen.js'> </script>
-        <script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
-        <script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
-        <script language='javascript' src='/opac/common/js/org_utils.js'> </script>
-        <script language='javascript' src='/opac/common/js/init.js'> </script>
-        <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
-
-
-
-        <!--
-        <script language='javascript' src='/opac/common/js/date.js'> </script>
-        -->
-        <script language='javascript' src='../admin/adminlib.js'> </script>
-        <script language='javascript' src='ue_config.js'> </script>
-        <script language='javascript' src='ue_ui.js'> </script>
-        <script language='javascript' src='ue.js'> </script>
-        <link type='text/css' rel='stylesheet' href='../admin/admin.css'/>
-  
-        <link rel="stylesheet" type="text/css" media="all" 
-            href="/opac/common/js/jscalendar/calendar-brown.css" title="win2k-cold-1" />
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/lang/calendar-en.js"></script>
-        <script type="text/javascript" src="/opac/common/js/jscalendar/calendar-setup.js"></script>
-
-
-        <style type='text/css'>
-            .messagecatalog { -moz-binding: url( /xul/server/main/bindings.xml#messagecatalog ) }
-            .main_table { width: 98%; border-collapse: collapse;}
-            .main_table td { border: 1px solid #E0F0E0; text-align: center; padding: 4px;}
-            #uedit_nav_bar { border: 2px solid #E0F0E0; padding: 6px;}
-            .nav_link { padding-left: 90px; padding-right: 90px; }
-            .main_nav_link { -moz-border-radius: 7px; height: 13%;}
-            /*
-            .main_div { height: 480px; padding-left: 15px; 
-                text-align: center; vertical-align: middle; overflow: auto;}
-                */
-
-            .main_div { min-height: 450px; padding-left: 15px; 
-                text-align: center; vertical-align: middle; }
-
-            .nav_link_table { height: 480px;}
-            .label_active { background: #E0F0E0; }
-            .right { text-align: right; padding-right: 3px;}
-            .left { text-align: left; padding-left: 3px;}
-            .wide { width: 98%;}
-            .pad { padding-left: 3px; padding-right: 3px; }
-            .no_border td { border: none; }
-            .uedit_table { width: 80% }
-            .address_table { -moz-border-radius: 4px; border: 4px solid #E0E0F0; padding: 4px; }
-            .shared_address { background : #E0F0F0; }
-            .address_table td { border: none; width: auto; padding: 1px; }
-            .addr_info_checked { -moz-border-radius: 6px; background: #F0E0E0; }
-            .button_row { width: 95%; text-align: center; margin-top: 7px; border: 1px solid #E0E0E0; }
-            /*.required_field { background: #F0E0E0; }*/
-            .invalid_value { background: red; }
-
-            /* all text inputs that don't have the .invalid_value 
-                class applied and are currently focused */
-            input:focus:not(.invalid_value) { background: #E0F0E0; color: darkblue;}
-
-            .deleted { background: #FF6666; }
-
-            .dup_link { padding-left: 5px; color: red; }
-
-
-        </style>
-    </head>
-    
-    <div class="messagecatalog" id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
-
-    <body onload='uEditInit();'>
-
-    <center>
-
-        <h2>&ev.staff.patron.ue_xhtml.ev_user_editor.label;</h2>
-
-        <div style='position:absolute; top: 5px; right: 5px;'>
-            <span>&ev.staff.patron.ue_xhtml.welcome.label;</span><b><span id='uedit_user'></span></b>
-        </div>
-
-        <hr/><br/>
-
-        <div id='main_div_container'>
-
-        <table style='margin-bottom: 5px; width:100%;'>
-            <tbody>
-                <tr>
-                    <td align='left' width='80%'>
-                        <b>
-                            <span>&staff.patron.ue.interface_note.label;</span>
-                        </b>
-                    </td>
-                    <td align='right' width='20%'>
-                        <a class='hide_me' id='ue_errors' href='javascript:void(0);' 
-                            style='color: red; font-size: 12pt; font-weight: bold' onclick='uEditAlertErrors();'>
-                            &ev.staff.patron.ue_xhtml.view_errors.label;
-                        </a>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-
-        <table class='main_table'>
-            <tbody>
-                <tr>
-                    <td width='15%' valign='top'>
-                        <!-- ************************************************************** -->
-                        <!--  Top Navigation Links -->
-                        <!-- ************************************************************** -->
-                        <table height='100%' class='nav_link_table'>
-                            <tbody>
-                                <tr>
-                                    <td id='uedit_userid_label' class='main_nav_link'>
-                                        <a href='javascript:uEditShowPage("uedit_userid");'>&ev.staff.patron.ue_xhtml.user_id.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_contact_info_label' class='main_nav_link'>    
-                                        <a href='javascript:uEditShowPage("uedit_contact_info");'>&ev.staff.patron.ue_xhtml.contact_info.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_addresses_label' class='main_nav_link'>        
-                                        <a href='javascript:uEditShowPage("uedit_addresses");'>&ev.staff.patron.ue_xhtml.addresses.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_groups_label' class='main_nav_link'>            
-                                        <a href='javascript:uEditShowPage("uedit_groups");'>&ev.staff.patron.ue_xhtml.groups_permissions.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_stat_cats_label' class='main_nav_link'>        
-                                        <a href='javascript:uEditShowPage("uedit_stat_cats");'>&ev.staff.patron.ue_xhtml.statistical_categories.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_surveys_label' class='main_nav_link'>            
-                                        <a href='javascript:uEditShowPage("uedit_surveys");'>&ev.staff.patron.ue_xhtml.surveys.label;</a>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td id='uedit_finalize_label' class='main_nav_link'>            
-                                        <a href='javascript:uEditShowPage("uedit_finalize");'>&ev.staff.patron.ue_xhtml.finish.label;</a>
-                                    </td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-
-                    <td width='85%' id='uedit_loading'>
-                        <div class='main_div has_color' 
-                            style='padding: 50px; vertical-align: middle;'>
-                            <b>&ev.staff.patron.ue_xhtml.loading_data.label;</b>
-                        </div>
-                    </td>
-
-
-                    <td width='85%' id='ue_maintd' class='hide_me'>
-
-                        <div id='dup_div_container'>
-                            <div id='dup_div' name='dup_div'>
-                                <a name='link' class='dup_link hide_me'
-                                    href='javascript:void(0);' onclick='uEditShowSearch(this);'>
-                                    &ev.staff.patron.ue_xhtml.found_duplicate_patron.label; <b name='count'/>
-                                    <b name='data'/>
-                                </a>
-                            </div>
-                        </div>
-
-
-                        <!-- ************************************************************** -->
-                        <!--  Identification Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_userid' class='main_div'>
-                            <table class='uedit_table'>
-                                <tbody>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.barcode.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input type='text' id='ue_barcode' />
-                                                    <!--
-                                                    onblur=' 
-                                                        var node = uEditFindFieldByWId("ue_username");
-                                                        if(!node.widget.node.value) {
-                                                            node.widget.node.value = this.value;
-                                                            node.widget.node.onchange();
-                                                        }'
-                                                        /> -->
-                                                        <button style='padding-left: 5px;' class='hide_me' id='ue_mark_card_lost'
-                                                    onclick='uEditMarkCardLost();'>&ev.staff.patron.ue_xhtml.mark_lost.label;</button>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.username.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_username'/></div></td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.password.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input type='password' id='ue_password1'/>
-                                                <button class='hide_me' onclick='uEditResetPw();' id='ue_reset_pw'>&ev.staff.patron.ue_xhtml.reset.label;</button>
-                                                <span style='padding-left: 10px;' class='hide_me' id='ue_password_gen'>
-                                                    &ev.staff.patron.ue_xhtml.re_password.label;
-                                                    <span style='text-decoration:underline;' id='ue_password_plain'></span>
-                                                </span>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.verify_password.label;</div></td>
-                                        <td><div class='wide left'><input type='password' id='ue_password2'/></div></td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.first_name.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_firstname'/></div></td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.middle_name.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_middlename'/></div></td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.last_name.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_lastname'/></div></td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.suffix.label;</div></td>
-                                        <td><div class='wide left'>
-                                            <input type='text' id='ue_suffix'/>
-                                            <select id='ue_suffix_selector' style='width: 6em;'
-                                                onclick='$("ue_suffix").value = this.options[this.selectedIndex].value;$("ue_suffix").onchange();'
-                                                onchange='$("ue_suffix").value = this.options[this.selectedIndex].value;$("ue_suffix").onchange();'>
-                                                <option value=''>&ev.staff.patron.ue_xhtml.pick_suffix.label;</option>
-                                                <option value='Jr'>Jr</option>
-                                                <option value='Sr'>Sr</option>
-                                                <option value='II'>II</option>
-                                                <option value='III'>III</option>
-                                                <option value='AA'>AA</option>
-                                                <option value='AS'>AS</option>
-                                                <option value='AAS'>AAS</option>
-                                                <option value='BA'>BA</option>
-                                                <option value='BS'>BS</option>
-                                                <option value='CFPIM'>CFPIM</option>
-                                                <option value='CPA'>CPA</option>
-                                                <option value='CPIM'>CPIM</option>
-                                                <option value='CPM'>CPM</option>
-                                                <option value='CXE'>CXE</option>
-                                                <option value='DC'>DC</option>
-                                                <option value='DDS'>DDS</option>
-                                                <option value='DO '>DO</option>
-                                                <option value='DPM'>DPM</option>
-                                                <option value='DVM'>DVM</option>
-                                                <option value='Esq'>Esq</option>
-                                                <option value='FACAAI'>FACAAI</option>
-                                                <option value='FACP'>FACP</option>
-                                                <option value='FACS'>FACS</option>
-                                                <option value='FACEP'>FACEP</option>
-                                                <option value='FCP'>FCP</option>
-                                                <option value='FICS'>FICS</option>
-                                                <option value='GYN'>GYN</option>
-                                                <option value='JD'>JD</option>
-                                                <option value='LPN'>LPN</option>
-                                                <option value='MA'>MA</option>
-                                                <option value='MCSE'>MCSE</option>
-                                                <option value='MD'>MD</option>
-                                                <option value='MS'>MS</option>
-                                                <option value='NMD'>NMD</option>
-                                                <option value='OB'>OB</option>
-                                                <option value='PhD'>PhD</option>
-                                                <option value='RN'>RN</option>
-                                            </select>
-                                        </div></td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.alias.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_alias'/></div></td>
-                                    </tr>
-
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.dob.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-    
-                                                <input type='text' id='ue_dob' size='10' maxlength='10' 
-                                                    onfocus='/*$("ue_dob_trigger").onclick(event);*/'>1980-01-01</input>
-    
-                                                <button style='padding: 0px;' id='ue_dob_trigger'>
-                                                    <img src="/opac/common/js/jscalendar/img.gif" 
-                                                        style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                                                        title="Date selector"
-                                                        onmouseover="this.style.background='red';" 
-                                                        onmouseout="this.style.background=''" />
-                                                </button>
-
-                                                <span class='pad' style='font-size: 8pt;'>(YYYY-MM-DD)</span>
-    
-                                                <script type="text/javascript">
-                                                    Calendar.setup({
-                                                        inputField    : "ue_dob",                // id of the input field
-                                                        ifFormat        : "%Y-%m-%d",            // format of the input field
-                                                        button        : "ue_dob_trigger",  // trigger for the calendar (button ID)
-                                                        align            : "Tl",                    // alignment (defaults to "Bl")
-                                                        singleClick    : true
-                                                    });
-                                                </script>
-    
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.juvenile.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input id='ue_juvenile' type='checkbox'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.primary_id_type.label;</div></td>
-                                        <td><div class='wide left'>
-                                                <select id='ue_primary_ident_type'>
-                                                    <option value=''>&ev.staff.patron.ue_xhtml.required.label;</option>
-                                                </select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.primary_id.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input type='text' id='ue_primary_ident'/>
-                                                <span id='primary_ident_ssn_help' 
-                                                    style='padding-left: 2px; font-size: 8pt;' class='hide_me'>
-                                                    &ev.staff.patron.ue_xhtml.primary_ident_ssn_help.label;
-                                                </span>
-                                                <span id='primary_ident_dl_help' 
-                                                    style='padding-left: 2px; font-size: 8pt;' class='hide_me'>
-                                                    &ev.staff.patron.ue_xhtml.primary_ident_dl_help.label;    
-                                                </span>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <!--
-                                    <tr>
-                                        <td><div class='wide right'>Secondary Identification Type</div></td>
-                                        <td><div class='wide left'>
-                                                <select id='ue_secondary_ident_type'>
-                                                    <option value=''>  None Selected  </option>
-                                                </select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    -->
-                                    <tr class='hide_me'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.parent_guardian.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input type='text' id='ue_secondary_ident'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <!--
-                                    <tr class='hide_me' id='ue_guardian_row'>
-                                        <td><div class='wide right'><b>Parent / Guardian</b></div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <span id='ue_guardian_field'></span>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    -->
-                                </tbody>
-                            </table>
-                        </div>
-
-                        <!-- ************************************************************** -->
-                        <!-- Contact Info Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_contact_info' class='main_div hide_me'>
-
-                            <table class='uedit_table'>
-                                <tbody>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.email_address.label;</div></td>
-                                        <td><div class='wide left'><input type='text' id='ue_email' size='32'/></div></td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.daytime_phone.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input class='pad' type='text' id='ue_day_phone' size='18'/>
-                                                <span style='font-size: 9pt;'>&ev.staff.patron.ue_xhtml.phone_example;</span>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.evening_phone.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input class='pad' type='text' id='ue_night_phone' size='18'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.other_phone.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input class='pad' type='text' id='ue_other_phone' size='18'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.home_library.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <select style='width: 20em;' id='ue_org_selector'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table>
-                        </div>
-    
-                        <!-- ************************************************************** -->
-                        <!-- Addresses Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_addresses' class='main_div hide_me' >
-                            <table class='uedit_table' style='width: 98%; padding: 1px;'>
-                                <thead>
-                                    <tr>
-                                        <td>&ev.staff.patron.ue_xhtml.address.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.in_city_limits.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.valid.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.mailing_address.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.physical_address.label;</td>
-                                    </tr>
-                                </thead>
-                                <tbody id='ue_address_tbody'>
-                                    <tr id='ue_address_template'>
-                                        <td>
-                                            <table class='address_table'>
-                                                <tbody>
-                                                    <tr name='shared_row' class='hide_me'>
-                                                        <td colspan='6'>
-                                                            <div style='padding: 8px;'>
-                                                                <span style='color:red;'>*</span>
-                                                                &ev.staff.patron.ue_xhtml.address_owned_by.label;
-                                                                <span name='addr_owner_name'></span>
-                                                                <span name='owner_link_div'>
-                                                                    (<a name='addr_owner' href='javascript:void(0);'>&ev.staff.patron.ue_xhtml.edit.label;</a>)
-                                                                </span>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.label.label;</div></td>
-                                                        <td colspan='3'>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_label' id='ue_addr_label'/>
-                                                            </div>
-                                                        </td>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.zip.label;</div></td>
-                                                        <td>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_zip' size='10' maxlength='10'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.street1.label;</div></td>
-                                                        <td colspan='5'>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_street1' size='42'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.street2.label;</div></td>
-                                                        <td colspan='5'>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_street2' size='42'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.city.label;</div></td>
-                                                        <td colspan='3'>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_city' size='17'/>
-                                                            </div>
-                                                        </td>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.conuty.label;</div></td>
-                                                        <td>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_county' size='17'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.state.label;</div></td>
-                                                        <td colspan='3'>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_state' size='3' maxlength='3'/>
-                                                            </div>
-                                                        </td>
-                                                        <!--
-                                                        <td><div class='wide right'>Zip</div></td>
-                                                        <td>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_zip' size='6' maxlength='6'/>
-                                                            </div>
-                                                        </td>
-                                                        -->
-                                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.country.label;</div></td>
-                                                        <td>
-                                                            <div class='wide left'>
-                                                                <input type='text' name='ue_addr_country' size='6'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td colspan='6'>
-                                                            <div class='button_row'>
-                                                                <input type='submit' name='ue_addr_delete' 
-                                                                    value='&ev.staff.patron.ue_xhtml.ue_addr_delete.label;'/>
-                                                                <span style='padding-left: 10px;'> </span>
-                                                                <input type='submit' name='ue_addr_detach' 
-                                                                    value='&ev.staff.patron.ue_xhtml.ue_addr_detach.label;' class='hide_me'/>
-                                                                <input type='submit' name='ue_addr_approve' 
-                                                                    value='&ev.staff.patron.ue_xhtml.ue_addr_approve.label;' class='hide_me'/>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                    <tr class='hide_me' name='ue_addr_replaced_row'>
-                                                        <td colspan='6'>
-                                                            <div class='button_row' name='ue_addr_replaced_div'>
-                                                            </div>
-                                                        </td>
-                                                    </tr>
-                                                </tbody>
-                                            </table>
-                                        </td>
-                                        <td><input type='checkbox' name='ue_addr_inc_yes' checked='checked'/></td>
-                                        <td><input type='checkbox' name='ue_addr_valid_yes' checked='checked'/></td>
-                                        <td>
-                                            <div style='width: 100%; -moz-border-radius: 8px;'>
-                                                <input type='radio' name='ue_addr_mailing_yes'
-                                                    onchange='uEditAddrTypeClick(this, "mailing");'
-                                                    onclick='uEditAddrTypeClick(this, "mailing");'/>
-                                            </div>
-                                        </td>
-                                        <td>
-                                            <div style='width: 100%; -moz-border-radius: 8px;'>
-                                                <input type='radio' name='ue_addr_billing_yes'
-                                                    onchange='uEditAddrTypeClick(this, "billing");'
-                                                    onclick='uEditAddrTypeClick(this, "billing");'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table>
-
-                            <div class='button_row' style='margin-top: 20px;'>
-                                <!--
-                                <input type='submit' value='Create a New Address' id='ue_address_new'/>
-                                -->
-                                <input type='submit' value='&staff.patron.ue.create_address.label;' onclick='uEditCreateNewAddr();'/>
-                            </div>
-                        </div>
-    
-                        <!-- ************************************************************** -->
-                        <!-- Groups Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_groups' class='main_div hide_me'>
-                            <table class='uedit_table'>
-                                <tbody>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.profile_group.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <select id='ue_profile' class='select_big'>
-                                                    <option value=''>&ev.staff.patron.ue_xhtml.required.label;</option>
-                                                </select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr class='required_field'>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.account_expiration_date.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input type='text' id='ue_expire' size='10' maxlength='10'/>
-    
-                                                <button style='padding: 0px;' id='ue_expire_trigger'>
-                                                    <img src="/opac/common/js/jscalendar/img.gif" 
-                                                        style="cursor: pointer; border: 1px solid red; padding: 0px; margin: -3px;" 
-                                                        title="&ev.staff.patron.ue_xhtml.date_selector.label;"
-                                                        onmouseover="this.style.background='red';" 
-                                                        onmouseout="this.style.background=''" />
-                                                </button>
-
-                                                <span class='pad' style='font-size: 8pt;'>(YYYY-MM-DD)</span>
-                                                <script type="text/javascript">
-                                                    Calendar.setup({
-                                                        inputField    : "ue_expire",                // id of the input field
-                                                        ifFormat        : "%Y-%m-%d",                // format of the input field
-                                                        button        : "ue_expire_trigger",  // trigger for the calendar (button ID)
-                                                        align            : "Tl",                        // alignment (defaults to "Bl")
-                                                        singleClick    : true
-                                                    });
-                                                </script>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.net_access_level.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <select id='ue_net_level'>
-                                                </select>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.active.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input id='ue_active' type='checkbox' checked='checked'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.barred.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input id='ue_barred' type='checkbox'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.set_family_group_lead_account.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input id='ue_group_lead' type='checkbox'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.claims_returned_count.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <input id='ue_claims_returned' type='text' disabled='disabled' size='6'/>
-                                                <script>
-                                                    $('ue_claims_returned').value = 0;
-                                                    $('ue_claims_returned').disabled = true;
-                                                </script>
-                                                <input class='pad' id='ue_claims_returned_reset' type='submit' value='&ev.staff.patron.ue_xhtml.reset.label;' 
-                                                    onclick="
-                                                        if( confirmId('ue_claims_return_confirm') ) {
-                                                            $('ue_claims_returned').value = 0;
-                                                            $('ue_claims_returned').onchange();
-                                                        }
-                                                    "/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td><div class='wide right'>&ev.staff.patron.ue_xhtml.alert_message.label;</div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <textarea wrap='soft' cols='30' rows='4' id='ue_alert_message'/>
-                                                <input class='pad' id='ue_alert_message_reset' 
-                                                    type='submit' value='&ev.staff.patron.ue_xhtml.alert_message_reset.value;' 
-                                                        onclick='
-                                                        var node = $("ue_alert_message");
-                                                        node.value = "";
-                                                        if(node.onchange) node.onchange();'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table>
-                        </div>
-    
-                        <!-- ************************************************************** -->
-                        <!-- Stat Cats Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_stat_cats' class='main_div hide_me'>
-                            <table class='uedit_table' style='width: 98%'>
-                                <thead>
-                                    <tr style='font-weight: bold;'>
-                                        <td>&ev.staff.patron.ue_xhtml.stat_cat_name.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.owner.label;</td>
-                                        <td>&ev.staff.patron.ue_xhtml.value.label;</td>
-                                    </tr>
-                                </thead>
-                                <tbody id='ue_stat_cat_tbody'>
-                                    <tr id='ue_stat_cat_row'>
-                                        <td><div class='wide right' name='ue_stat_cat_name'></div></td>
-                                        <td><div class='wide right' style='font-size: 8pt' name='ue_stat_cat_owner'></div></td>
-                                        <td>
-                                            <div class='wide left'>
-                                                <select name='ue_stat_cat_selector'>
-                                                    <option value=''>&ev.staff.patron.ue_xhtml.none_selected.label;</option>
-                                                </select>
-                                                <span class='pad'> or </span>
-                                                <input class='pad' type='text' name='ue_stat_cat_newval'/>
-                                            </div>
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table>
-
-                        </div>
-    
-                        <!-- ************************************************************** -->
-                        <!-- Surveys Pane -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_surveys' class='main_div hide_me'>
-                            <div id='uedit_no_surveys' class='hide_me'>
-                                <b>&ev.staff.patron.ue_xhtml.no_surveys_for_location.label;</b>
-                            </div>
-                            <table id='ue_survey_table' 
-                                class='uedit_table data_grid' style='width: 95%; margin-top: 17px;'>
-                                <thead>
-                                    <tr>
-                                        <td colspan='2' style='text-align: left; padding-left: 20px;'>
-                                            <span class='pad' name='ue_survey_name' style='font-weight: bold;'></span>
-                                            <span class='pad' name='ue_survey_desc'> : </span>
-                                        </td>
-                                    </tr>
-                                </thead>
-                                <tbody name='ue_survey_tbody'>
-                                    <tr name='ue_survey_row'>
-                                        <td name='ue_survey_question' 
-                                            style='width: 60%; text-align: left; padding-left: 40px;'/>
-                                        <td>
-                                            <select name='ue_survey_answer'>
-                                                <option value=''>&ev.staff.patron.ue_xhtml.none_selected.label;</option>
-                                            </select>
-                                        </td>
-                                    </tr>
-                                </tbody>
-                            </table>
-                        </div>
-
-                        <!-- ************************************************************** -->
-                        <!-- Finish Up -->
-                        <!-- ************************************************************** -->
-                        <div id='uedit_finalize' class='main_div hide_me'>
-                            <div class='has_color' style='width: 95%; margin-top: 40px; text-align: center'>
-                                <div style='padding: 5px;'>
-                                    &ev.staff.patron.ue_xhtml.finishing_message.label;
-                                </div>
-                                <br/>
-                                <div style='margin-bottom: 15px;'>
-                                    <a style='margin-right: 30px;' id='ue_view_summary' 
-                                        href='javascript:uEditShowSummary();'>View Summary</a>
-                                </div>
-                                <input style='margin-left: 5px; margin-right: 5px;' id='ue_save'
-                                    type='submit' value='&ev.staff.patron.ue_xhtml.save_user.value;' onclick='uEditSaveUser();'/>
-                                <input style='margin-left: 5px; margin-right: 5px;' id='ue_save_clone'
-                                    type='submit' value='&ev.staff.patron.ue_xhtml.save_clone_user.value;' onclick='uEditSaveUser(true);'/>
-                                <button style='margin-left: 5px; margin-right: 5px;' 
-                                    onclick='if(confirm($("ue_cancel_confirm").innerHTML)) uEditCancel();'>&ev.staff.patron.ue_xhtml.cancel.value;</button>
-                            </div>
-                        </div>
-                    </td>
-                </tr>
-
-                <tr>
-                    <td colspan='2'>
-                        <!-- ************************************************************** -->
-                        <!-- Bottom Navigation Links -->
-                        <!-- ************************************************************** -->
-                        <table width='100%' class='no_border'>
-                            <tbody>
-                                <tr id='uedit_nav_bar'>
-                                    <td width='10%'/>
-                                    <td width='40%'>
-                                        <a id='ue_back' class='nav_link hide_me' 
-                                            href='javascript:uEditPrev()'>&#x2190;&ev.staff.patron.ue_xhtml.back.label;</a>
-                                    </td>
-                                    <td width='40%'>
-                                        <a id='ue_fwd' class='nav_link' 
-                                            href='javascript:uEditNext()'>&ev.staff.patron.ue_xhtml.forward.label;&#x2192;</a>
-                                    </td>
-                                    <td width='10%'/>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-
-    </center>
-
-    <div id='summary_div_container' class='hide_me'>
-
-    <div id='ue_summary_page'>
-        <table id='ue_summary_table' class='data_grid' width='55%'>
-            <thead>
-                <tr>
-                    <td colspan='2'>
-                        <span>&staff.patron.ue.user_summary.label;</span>
-                    </td>
-                </tr>
-            </thead>
-            <tbody name='ue_summary_page_tbody'>
-
-                <tr>
-
-                    <td colspan='2' align='center'>
-                        <input style='margin-right: 15px;' type='submit' value='&ev.staff.patron.ue_xhtml.print_page.label;' onclick='window.print();'/>
-                        <input style='margin-left: 15px;' type='submit' value='&ev.staff.patron.ue_xhtml.return_to_editor.label;' 
-                            onclick=' unHideMe($("main_div_container")); 
-                                hideMe($("summary_div_container"));'/>
-                    </td>
-                </tr>
-
-                <tr><td>&ev.staff.patron.ue_xhtml.barcode.label;</td><td id='ue_summary_barcode'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.username.label;</td><td id='ue_summary_usrname'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.first_name.label;</td><td id='ue_summary_first_given_name'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.middle_name.label;</td><td id='ue_summary_second_given_name'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.last_name.label;</td><td id='ue_summary_family_name'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.alias.label;</td><td id='ue_summary_alias'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.suffix.label;</td><td id='ue_summary_suffix'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.dob.label;</td><td id='ue_summary_dob'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.primary_id_type.label;</td><td id='ue_summary_ident_type'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.primary_id.label;</td><td id='ue_summary_ident_value'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.secondary_id_type.label;</td><td id='ue_summary_ident_type2'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.secondary_id.label;</td><td id='ue_summary_ident_value2'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.email_address.label;</td><td id='ue_summary_email'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.daytime_phone.label;</td><td id='ue_summary_day_phone'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.evening_phone.label;</td><td id='ue_summary_evening_phone'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.other_phone.label;</td><td id='ue_summary_other_phone'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.home_library.label;</td><td id='ue_summary_home_ou'/></tr>
-
-                <tr>
-                    <td colspan='2'>
-                        <table width='100%' style='margin-top: 15px; margin-bottom: 15px;'>
-                            <thead><tr><td>&ev.staff.patron.ue_xhtml.addresses.label;</td></tr></thead>
-                            <tbody name='ue_summary_addr_tbody'>
-                                <tr name='ue_summary_addr_row'>
-                                    <td>
-                                        <table name='ue_summary_addr_table' width='100%'>
-                                            <thead><tr><td colspan='4'/><span> </span></tr></thead>
-                                            <tbody>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.address_label.label;</b></td><td name='label'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.zip.label;</b></td><td name='zip'/>
-                                                </tr>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.street1.label;</b></td><td name='street1'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.country.label;</b></td><td name='country'/>
-                                                </tr>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.street2.label;</b></td><td name='street2'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.mailing.label;</b></td><td name='mailing'/>
-                                                </tr>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.city.label;</b></td><td name='city'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.billing.label;</b></td><td name='billing'/>
-                                                </tr>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.county.label;</b></td><td name='county'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.valid.label;</b></td><td name='valid'/>
-                                                </tr>
-                                                <tr>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.state.label;</b></td><td name='state'/>
-                                                    <td><b>&ev.staff.patron.ue_xhtml.in_city_limits.label;</b></td><td name='incorporated'/>
-                                                </tr>
-                                            </tbody>
-                                        </table>
-                                    </td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.profile.label;</td><td id='ue_summary_profile'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.active.label;</td><td id='ue_summary_active'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.barred.label;</td><td id='ue_summary_barred'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.expire_date.label;</td><td id='ue_summary_expire_date'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.family_lead_account.label;</td><td id='ue_summary_master_account'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.claims_returned_count.label;</td><td id='ue_summary_claims_returned_count'/></tr>
-                <tr><td>&ev.staff.patron.ue_xhtml.alert_message.label;</td><td id='ue_summary_alert_message'/></tr>
-                <tr name='ue_summary_stat_cat_td'>
-                    <td colspan='2' >
-                        <table width='100%' style='margin-top: 15px; margin-bottom: 15px;'>
-                            <thead><tr><td colspan='2'>&ev.staff.patron.ue_xhtml.stat_categories.label;</td></tr></thead>
-                            <tbody name='ue_summary_stats_tbody'>
-                                <tr name='ue_summary_stats_row'>
-                                    <td name='ue_summary_stat_name'/><td name='ue_summary_stat_value'/>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-                <tr name='ue_summary_survey_td'>
-                    <td colspan='2'>
-                        <table width='100%' style='margin-top: 15px; margin-bottom: 15px;'>
-                            <thead>
-                                <tr>
-                                    <td>&ev.staff.patron.ue_xhtml.survey.label;</td>
-                                    <td>&ev.staff.patron.ue_xhtml.question.label;</td>
-                                    <td>&ev.staff.patron.ue_xhtml.answer.label;</td>
-                                </tr>
-                            </thead>
-                            <tbody name='ue_summary_survey_tbody'>
-                                <tr name='ue_summary_survey_row'>
-                                    <td name='ue_summary_survey_name'/>
-                                    <td name='ue_summary_survey_question'/>
-                                    <td name='ue_summary_survey_answer'/>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-                <tr>
-                    <td colspan='2' align='center'>
-                        <input style='margin-right: 15px;' type='submit' value='&ev.staff.patron.ue_xhtml.print_page.label;' onclick='window.print();'/>
-                        <input style='margin-left: 15px;' type='submit' value='&ev.staff.patron.ue_xhtml.return_to_editor.label;' 
-                            onclick=' unHideMe($("main_div_container")); 
-                                hideMe($("summary_div_container"));'/>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
-    </div>
-    </div>
-
-
-    <!-- ************************************************************** -->
-    <!-- This holds all of the strings we may have to alert to the user -->
-    <!-- ************************************************************** -->
-    <div class='hide_me'>
-        <span id='ue_bad_dob'>&staff.patron.ue.bad_dob.label;</span>
-        <span id='ue_bad_username'>&staff.patron.ue.bad_username.label;</span>
-        <span id='ue_bad_password'>&staff.patron.ue.bad_passwords.label;</span>
-        <span id='ue_bad_firstname'>&staff.patron.ue.bad_firstname.label;</span>
-        <span id='ue_bad_middlename'>&staff.patron.ue.bad_middlename.label;</span>
-        <span id='ue_bad_lastname'>&staff.patron.ue.bad_lastname.label;</span>
-        <span id='ue_bad_barcode'>&staff.patron.ue.bad_barcode.label;</span>
-        <span id='ue_duplicate_barcode'>&staff.patron.ue.duplicate_barcode.label;</span>
-        <span id='ue_new_barcode_warn'>&staff.patron.ue.new_barcode_warn.label;</span>
-        <span id='ue_no_ident'>&staff.patron.ue.no_ident.label;</span>
-        <span id='ue_bad_ident_dl'>&staff.patron.ue.bad_ident_dl.label;</span>
-        <span id='ue_bad_ident_ssn'>&staff.patron.ue.bad_ident_ssn.label;</span>
-        <span id='ue_bad_email'>&staff.patron.ue.bad_email.label;</span>
-        <span id='ue_bad_phone'>&staff.patron.ue.bad_phone.label;</span>
-        <span id='ue_no_profile'>&staff.patron.ue.no_profile.label;</span>
-        <span id='ue_bad_expire'>&staff.patron.ue.bad_expire.label;</span>
-        <span id='ue_bad_claims_returned'>&staff.patron.ue.bad_claims_returned.label;</span>
-        <span id='ue_no_profile'>&ev.staff.patron.ue_xhtml.no_profile.label;</span>
-        <span id='ue_unknown_error'>&staff.patron.ue.unknown_error.label;</span>
-        <span id='ue_bad_addr_label'>&staff.patron.ue.bad_addr_label.label;</span>
-        <span id='ue_bad_addr_street'>&staff.patron.ue.bad_addr_street.label;</span>
-        <span id='ue_bad_addr_city'>&staff.patron.ue.bad_addr_city.label;</span>
-        <span id='ue_bad_addr_county'>&staff.patron.ue.bad_addr_county.label;</span>
-        <span id='ue_bad_addr_state'>&staff.patron.ue.bad_addr_state.label;</span>
-        <span id='ue_bad_addr_country'>&staff.patron.ue.bad_addr_country.label;</span>
-        <span id='ue_bad_addr_zip'>&staff.patron.ue.bad_addr_zip.label;</span>
-        <span id='ue_bad_survey'>&staff.patron.ue.bad_survey.label;</span>
-        <span id='ue_delete_addr_warn'>&staff.patron.ue.delete_addr_warn.label;</span>
-        <span id='yes'>&staff.patron.ue.yes.label;</span>
-        <span id='no'>&staff.patron.ue.no.label;</span>
-        <span id='ue_summary_window'>&staff.patron.ue.summary_window.label;</span>
-        <span id='ue_success'>&staff.patron.ue.success.label;</span>
-        <span id='ue_dup_ident1'>&staff.patron.ue.dup_ident1.label;</span>
-        <span id='ue_dup_username'>&staff.patron.ue.dup_username.label;</span>
-        <span id='ue_dup_barcode'>&staff.patron.ue.dup_barcode.label;</span>
-        <span class='hide_me' id='ue_cancel_confirm'>&staff.patron.ue.cancel_confirm.label;</span>
-        <span class='hide_me' id='ue_juv_guardian'>&staff.patron.ue.juv_guardian.label;</span>
-        <span class='hide_me' id='ue_bad_date'>&staff.patron.ue.bad_date.label;</span>
-        <span class='hide_me' id='ue_made_barred'>&staff.patron.ue.made_barred.label;</span>
-        <span class='hide_me' id='ue_claims_return_confirm'>&ev.staff.patron.ue_xhtml.claims_return_confirm.label;</span>
-        <span class='hide_me' id='ue_unsaved_changes'>&ev.staff.patron.ue_xhtml.unsaved_changes.label;</span>
-        <span class='hide_me' id='ue_xact_collision'>&ev.staff.patron.ue_xhtml.xact_collision.label;</span>
-        <span class='hide_me' id='ue_add_approve_confirm'>&ev.staff.patron.ue_xhtml.ue_addr_approve_confirm.label;</span>
-    </div>
-
-    </body>
-</html>
-
diff --git a/Open-ILS/xul/staff_client/server/patron/ue_config.js b/Open-ILS/xul/staff_client/server/patron/ue_config.js
deleted file mode 100644
index 591763e..0000000
--- a/Open-ILS/xul/staff_client/server/patron/ue_config.js
+++ /dev/null
@@ -1,1167 +0,0 @@
-/* -----------------------------------------------------------------------
-    ----------------------------------------------------------------------- */
-const SC_FETCH_ALL        = 'open-ils.circ:open-ils.circ.stat_cat.actor.retrieve.all';
-const SC_CREATE_MAP        = 'open-ils.circ:open-ils.circ.stat_cat.actor.user_map.create';
-const SV_FETCH_ALL        = 'open-ils.circ:open-ils.circ.survey.retrieve.all';
-const FETCH_ID_TYPES        = 'open-ils.actor:open-ils.actor.user.ident_types.retrieve';
-const FETCH_GROUPS        = 'open-ils.actor:open-ils.actor.groups.tree.retrieve';
-const FETCH_NET_LEVELS    = 'open-ils.actor:open-ils.actor.net_access_level.retrieve.all';
-const UPDATE_PATRON        = 'open-ils.actor:open-ils.actor.patron.update';
-const PATRON_SEARCH        = 'open-ils.actor:open-ils.actor.patron.search.advanced';
-const ZIP_SEARCH            = 'open-ils.search:open-ils.search.zip';
-const APPROVE_ADDR        = 'open-ils.actor:open-ils.actor.user.pending_address.approve';
-const FETCH_ADDR_MEMS    = 'open-ils.actor:open-ils.actor.address.members';
-const FETCH_GRP_MEMS        = 'open-ils.actor:open-ils.actor.usergroup.members.retrieve';
-const CREATE_USER_NOTE    = 'open-ils.actor:open-ils.actor.note.create';
-const CHECK_BARCODE        = 'open-ils.actor:open-ils.actor.barcode.exists';
-const defaultState        = 'GA';
-const defaultCountry        = 'USA';
-const defaultNetAccess    = 'None';
-const defaultNetLevel   = 1;
-const CSS_INVALID_DATA    = 'invalid_value';
-
-// if no org setting exists
-const DEFAULT_ADULT_AGE            = '18 years';
-
-//const GUARDIAN_NOTE        = 'SYSTEM: Parent/Guardian';
-
-var dataFields;
-const numRegex        = /^\d+$/;
-const wordRegex    = /^[\w-]+$/;
-const unameRegex    = /^\w[\.\w\@-]*$/;
-const ssnRegex        = /^\d{3}-\d{2}-\d{4}$/;
-const dlRegex        = /^[a-zA-Z]{2}-\w+/; /* driver's license */
-const phoneRegex    = /^\d{3}-\d{3}-\d{4}(| \S+.*)$/i;
-const nonumRegex    = /^[^\d\s]\D*$/; /* no numbers, no beginning whitespace */
-const dateRegex    = /^\d{4}-\d{2}-\d{2}/;
-const zipRegex        = /^\d{5}(-\d{4}|-?$)|(^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$)/;
-
-var barredAlerted = false;
-
-
-function uEditUsrnameBlur(field) {
-    var usrname = uEditNodeVal(field);
-    if (!usrname) { return; }
-    var req = new Request(CHECK_USERNAME, SESSION, usrname);
-    req.callback( 
-        function(r) {
-            var res = r.getResultObject();
-            if( res !== null && res != patron.id() ) {
-                field.widget.onblur = null; /* prevent alert storm */
-                alertId('ue_dup_username');
-                field.widget.onblur = uEditUsrnameBlur;
-                setTimeout( 
-                    function() {
-                        field.widget.node.focus();
-                        field.widget.node.select();
-                    }, 10 
-                );
-            }
-        }
-    );
-    req.send();
-}
-
-
-function uEditBarcodeBlur(field) {
-    var barcode = uEditNodeVal(field);
-    if(!barcode) return;
-    _debug("blurring card with new value " + barcode);
-    var req = new Request(CHECK_BARCODE, SESSION, barcode);
-    req.callback( 
-        function(r) {
-            var res = r.getResultObject();
-            if( res == 1 ) {
-                field.widget.onblur = null; /* prevent alert storm */
-                alertId('ue_dup_barcode');
-                field.widget.onblur = uEditBarcodeBlur;
-                setTimeout( 
-                    function() {
-                        field.widget.node.focus();
-                        field.widget.node.select();
-                    }, 10 
-                );
-            } else {
-                var node = uEditFindFieldByWId("ue_username");
-                if(!node.widget.node.value) {
-                    node.widget.node.value = barcode;
-                    node.widget.node.onchange();
-                }
-            }
-        }
-    );
-    req.send();
-}
-
-
-function uEditDefineData(patron) {
-
-    var fields = [
-        {
-            required : true,
-            object    : patron.card(),
-            key        : 'barcode',
-            errkey    : 'ue_bad_barcode',
-            widget    : {
-                id        : 'ue_barcode',
-                regex    : wordRegex,
-                type    : 'input',
-                onblur : uEditBarcodeBlur
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'usrname',
-            errkey    : 'ue_bad_username',
-            widget    : {
-                id        : 'ue_username',
-                regex    : unameRegex,
-                type    : 'input',
-                onblur : uEditUsrnameBlur
-            }
-        },
-        {
-            required : (patron.isnew()) ? true : false,
-            object    : patron,
-            key        : 'passwd',
-            errkey    : 'ue_bad_password',
-            widget    : {
-                id        : 'ue_password1',
-                type    : 'input',
-                onpostchange : function(field, newval) {
-                    var pw2 = uEditFindFieldByWId('ue_password2');
-                    /* tell the second passsword input to re-validate */
-                    pw2.widget.node.onchange();
-                }
-
-            }
-        },
-        {
-            required : (patron.isnew()) ? true : false,
-            object    : patron,
-            key        : 'passwd',
-            errkey    : 'ue_bad_password',
-            widget    : {
-                id        : 'ue_password2',
-                type    : 'input',
-                onpostchange : function(field, newval) {
-                    var pw1f = uEditFindFieldByWId('ue_password1');
-                    var pw1 = uEditNodeVal(pw1f);
-                    field.widget.regex = new RegExp('^'+pw1+'$');
-                    if( pw1 ) field.required = true;
-                    else {
-                        if(!patron.isnew())
-                            field.required = false;
-                    }
-                }
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'first_given_name',
-            errkey    : 'ue_bad_firstname',
-            widget    : {
-                id        : 'ue_firstname',
-                regex    : nonumRegex,
-                type    : 'input',
-                onblur : function(field) {
-                    uEditCheckNamesDup('first', field );
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'second_given_name',
-            errkey    : 'ue_bad_middlename',
-            widget    : {
-                id        : 'ue_middlename',
-                regex    : nonumRegex,
-                type    : 'input'
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'family_name',
-            errkey    : 'ue_bad_lastname',
-            widget    : {
-                id        : 'ue_lastname',
-                regex    : nonumRegex,
-                type    : 'input',
-                onblur : function(field) {
-                    uEditCheckNamesDup('last', field );
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'suffix',
-            widget    : {
-                id            : 'ue_suffix',
-                type        : 'input',
-                onload    : function(val) {
-                    setSelector($('ue_suffix_selector'), val);
-                    $('ue_suffix_selector').onchange = function() {
-                        uEditFindFieldByKey('suffix').widget.node.onchange();
-                    }
-                },
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'alias',
-            widget    : {
-                id        : 'ue_alias',
-                type    : 'input',
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'dob',
-            errkey    : 'ue_bad_dob',
-            widget    : {
-                id            : 'ue_dob',
-                regex        : dateRegex,
-                type        : 'input',
-                onpostchange    : function(field) { uEditCheckDOB(field); },
-                onblur    : function(field) { uEditCheckDOB(field); }
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'ident_type',
-            errkey    : 'ue_no_ident',
-            widget    : {
-                id        : 'ue_primary_ident_type',
-                regex    : numRegex,
-                type    : 'select',
-                onpostchange : function(field, newval) 
-                    { _uEditIdentPostchange('primary', field, newval); }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'ident_value',
-            widget    : {
-                id            : 'ue_primary_ident',
-                type        : 'input',
-                onblur : function(field) {
-                    uEditCheckIdentDup(field);
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'ident_value2',
-            widget    : {
-                id            : 'ue_secondary_ident',
-                type        : 'input'
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'email',
-            errkey    : 'ue_bad_email',
-            widget    : {
-                id            : 'ue_email',
-                type        : 'input',
-                regex        :  /.+\@.+\..+/,  /* make me better */
-                onblur    : function(field) {
-                    var val = uEditNodeVal(field);
-                    if( val && val != field.oldemail ) {
-                        uEditRunDupeSearch('email',
-                            { email : { value : val, group : 0 } });
-                        field.oldemail = val;
-                    }
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'day_phone',
-            errkey    : 'ue_bad_phone',
-            widget    : {
-                id            : 'ue_day_phone',
-                type        : 'input',
-                regex        :  phoneRegex,
-                onpostchange: function(field, newval) {
-                    /*  if this is a new patron and we are using the phone number for
-                        the password and the staff edits the phone number after entering
-                        it (think typos), update the password too */
-                    if(uEditUsePhonePw && patron.isnew() && patron.passwd() != newval) {
-                        patron.passwd(null);
-                        uEditMakePhonePw();
-                    }
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'evening_phone',
-            errkey    : 'ue_bad_phone',
-            widget    : {
-                id            : 'ue_night_phone',
-                type        : 'input',
-                regex        :  phoneRegex
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'other_phone',
-            errkey    : 'ue_bad_phone',
-            widget    : {
-                id            : 'ue_other_phone',
-                type        : 'input',
-                regex        :  phoneRegex
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'home_ou',
-            widget    : {
-                id            : 'ue_org_selector',
-                type        : 'select',
-                regex        :  numRegex,
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'expire_date',
-            errkey    : 'ue_bad_expire',
-            widget    : {
-                id            : 'ue_expire',
-                type        : 'input',
-                regex        :  dateRegex,
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'active',
-            widget    : {
-                id            : 'ue_active',
-                type        : 'checkbox',
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'juvenile',
-            widget    : {
-                id            : 'ue_juvenile',
-                type        : 'checkbox',
-                onpostchange    : function(field) { uEditCheckDOB(uEditFindFieldByKey('dob')); },
-                onblur    : function(field) { uEditCheckDOB(uEditFindFieldByKey('dob')); }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'barred',
-            widget    : {
-                id            : 'ue_barred',
-                type        : 'checkbox',
-                onpostchange : function(field, val) {
-                    var afield = uEditFindFieldByKey('alert_message');
-                    if( val ) {
-                        if( !barredAlerted ) {
-                            barredAlerted = true;
-                            alertId('ue_made_barred');
-                        }
-                        afield.required = true;    
-                    } else {
-                        afield.required = false;
-                    }
-                }
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'profile',
-            errkey    : 'ue_no_profile',
-            widget    : {
-                id            : 'ue_profile',
-                type        : 'select',
-                regex        : numRegex,
-                onpostchange : function(field, value) {
-                    var type            = groupsCache[value];
-                    if(!type) return;
-                    var interval    = type.perm_interval();
-
-                    /* interval_to_seconds expects 'M' for months, 'm' for minutes */
-                    interval            = interval.replace(/mon/, 'Mon'); 
-                    var intsecs        = parseInt(interval_to_seconds(interval));
-
-                    var expdate        = new Date();
-                    var exptime        = expdate.getTime();
-                    exptime            += intsecs * 1000;
-                    expdate.setTime(exptime);
-
-                    _debug("profile change (interval= '"+interval+"', seconds="+intsecs+")\n\tgenerated a date of " + expdate);
-
-                    var year            = expdate.getYear() + 1900;
-                    var month        = (expdate.getMonth() + 1) + '';
-                    var day            = (expdate.getDate()) + '';
-
-                    if(!month.match(/\d{2}/)) month = '0' + month;
-                    if(!day.match(/\d{2}/)) day = '0' + day;
-
-
-                    var node = $('ue_expire');
-                    node.value = year+'-'+month+'-'+day;
-
-                    _debug("profile change formatted date to "+ node.value);
-                    node.onchange();
-                }
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'net_access_level',
-            widget    : {
-                id        : 'ue_net_level',
-                type    : 'select'
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'master_account',
-            widget    : {
-                id            : 'ue_group_lead',
-                type        : 'checkbox',
-            }
-        },
-        {
-            required : true,
-            object    : patron,
-            key        : 'claims_returned_count',
-            widget    : {
-                id            : 'ue_claims_returned',
-                type        : 'input',
-                regex        : numRegex,
-                disabled : true
-            }
-        },
-        {
-            required : false,
-            object    : patron,
-            key        : 'alert_message',
-            widget    : {
-                id            : 'ue_alert_message',
-                type        : 'input',
-            }
-        }
-    ];
-
-    for( var f in fields ) 
-        dataFields.push(fields[f]);
-
-    uEditBuildAddrs(patron);
-    uEditBuildPatronSCM(patron);
-}
-
-var uEditOldFirstName;
-var uEditOldMiddleName; /* future */
-var uEditOldLastName;
-function uEditCheckNamesDup(type, field) {
-    var newval = uEditNodeVal(field);
-    if(!newval) return;
-
-    var dosearch = false;
-
-    if(type =='first') {
-        if( newval != uEditOldFirstName )
-            dosearch = true;
-        uEditOldFirstName = newval;
-    }
-
-    if(type =='last') {
-        if( newval != uEditOldLastName )
-            dosearch = true;
-        uEditOldLastName = newval;
-    }
-
-    if( dosearch && uEditOldFirstName && uEditOldLastName ) {
-        var search_hash = {};
-        search_hash['first_given_name'] = { value : uEditOldFirstName, group : 0 };
-        search_hash['family_name'] = { value : uEditOldLastName, group : 0 };
-        uEditRunDupeSearch('names', search_hash);
-    }
-}
-
-var uEditOldIdentValue;
-function uEditCheckIdentDup(field) {
-    var newval = uEditNodeVal(field);
-    if( newval && newval != uEditOldIdentValue ) {
-        /* searches all ident_value fields */
-        var search_hash  = { ident : { value : newval, group : 2 } };
-        uEditRunDupeSearch('ident', search_hash);
-        uEditOldIdentValue = newval;
-    }
-}
-
-
-/* Adds all of the addresses attached to the patron object
-    to the fields array */
-var uEditAddrTemplate;
-function uEditBuildAddrs(patron) {
-    var tbody = $('ue_address_tbody');
-    if(!uEditAddrTemplate)
-        uEditAddrTemplate = tbody.removeChild($('ue_address_template'));
-    for( var a in patron.addresses() ) 
-        uEditBuildAddrFields( patron, patron.addresses()[a]);
-}
-
-
-function uEditDeleteAddr( tbody, row, address, detach ) {
-    if(!confirm($('ue_delete_addr_warn').innerHTML)) return;
-    if(address.isnew()) { 
-        patron.addresses(
-            grep( patron.addresses(), 
-                function(i) {
-                    return (i.id() != address.id());
-                }
-            )
-        );
-        if(!patron.addresses())
-            patron.addresses([]);
-
-        /* XXX */
-        for( var f in dataFields ) {
-            if( dataFields[f].object == address ) {
-                dataFields[f] = null;
-            }
-        }
-
-        dataFields = compactArray(dataFields);
-
-    } else {
-
-        if( detach ) { /* remove the offending address from the list */
-            patron.addresses(
-                grep( 
-                    patron.addresses(), 
-                    function(i) {
-                        return (i.id() != address.id());
-                    }
-                )
-            );
-            if(!patron.addresses()) {                                      
-                patron.addresses([]);                                      
-                patron.billing_address(null);                              
-                patron.mailing_address(null);
-                patron.ischanged(1);
-            }
-
-
-        } else {
-            address.isdeleted(1);
-        }
-    }
-
-    tbody.removeChild(row);
-
-    var bid = patron.billing_address();
-    bid = (bid != null && typeof bid == 'object') ? bid.id() : bid;
-
-    var mid = patron.mailing_address();
-    mid = (mid != null && typeof mid == 'object') ? mid.id() : mid;
-
-
-    /* -----------------------------------------------------------------------
-        if we're deleting a billing or mailing address 
-        make sure some other address is automatically
-        assigned as the billing or mailng address 
-        ----------------------------------------------------------------------- */
-
-    if( bid == address.id() ) {
-        for( var a in patron.addresses() ) {
-            var addr = patron.addresses()[a];
-            if(!addr.isdeleted() && addr.id() != address.id()) {
-                var node = uEditFindAddrInput('billing', addr.id());
-                node.checked = true;
-                uEditAddrTypeClick(node, 'billing');
-                break;
-            }
-        }
-    }
-
-    if( mid == address.id() ) {
-        for( var a in patron.addresses() ) {
-            var addr = patron.addresses()[a];
-            if(!addr.isdeleted() && addr.id() != address.id()) {
-                var node = uEditFindAddrInput('mailing', addr.id());
-                node.checked = true;
-                uEditAddrTypeClick(node, 'mailing');
-                break;
-            }
-        }
-    }
-
-}
-
-function uEditApproveAddr( tbody, row, address ) {
-    if(!confirm($('ue_add_approve_confirm').innerHTML)) return;
-    var req = new Request(APPROVE_ADDR, SESSION, address);
-    req.callback(
-        function(r) {
-            var oldId = r.getResultObject();
-            if(oldId != null) {
-                // remove the replaced address 
-                patron.addresses(
-                    grep( patron.addresses(), 
-                        function(i) { return (i.id() != oldId); }
-                    )
-                );
-                // update the ID on the new address
-                address.id(oldId);
-                address.replaces(null);
-                address.pending('f');
-                removeChildren($('ue_address_tbody'));
-                uEditBuildAddrs(patron);
-            }
-        }
-    );
-    req.send();
-}
-
-
-function uEditFindAddrInput(type, id) {
-    var tbody = $('ue_address_tbody');
-    var rows = tbody.getElementsByTagName('tr');
-    for( var r in rows ) {
-        var row = rows[r];
-        if(row.parentNode != tbody) continue;
-        var node = $n(row, 'ue_addr_'+type+'_yes');
-        if( node.getAttribute('address') == id )
-            return node;
-    }
-}
-
-
-function uEditAddrTypeClick(input, type) {
-    var tbody = $('ue_address_tbody');
-    var rows = tbody.getElementsByTagName('tr');
-    for( var r in rows ) {
-        var row = rows[r];
-        if(row.parentNode != tbody) continue;
-        var node = $n(row, 'ue_addr_'+type+'_yes');
-        removeCSSClass(node.parentNode,'addr_info_checked');
-    }
-
-    addCSSClass(input.parentNode,'addr_info_checked');
-    patron[type+'_address'](input.getAttribute('address'));
-    patron.ischanged(1);
-}
-
-
-
-
-/* Creates the field entries for an address object. */
-function uEditBuildAddrFields(patron, address) {
-
-    var tbody = $('ue_address_tbody');
-
-    var row    = tbody.appendChild(
-        uEditAddrTemplate.cloneNode(true));
-
-    uEditCheckSharedAddr(patron, address, tbody, row);
-    
-    // see if this is a pending address
-    if( isTrue(address.pending()) ) {
-        var button = $n(row, 'ue_addr_approve');
-        unHideMe(button);
-        button.onclick = function() { uEditApproveAddr( tbody, row, address ); }
-        var oldaddr = grep(patron.addresses(), function(a){return (a.id() == address.replaces());});
-        if(oldaddr) {
-            oldaddr = oldaddr[0];
-            unHideMe($n(row, 'ue_addr_replaced_row')); 
-            $n(row, 'ue_addr_replaced_div').innerHTML = 
-                $("patronStrings").getFormattedString(
-                    'web.staff.patron.ue.uedit_show_addr_replacement', [
-                    oldaddr.address_type(),
-                    oldaddr.street1(),
-                    oldaddr.street2(),
-                    oldaddr.city(),
-                    oldaddr.state(),
-                    oldaddr.post_code() 
-                ]);
-        }
-    }
-
-    $n(row, 'ue_addr_delete').onclick = 
-        function() { 
-            uEditDeleteAddr(tbody, row, address); 
-            uEditCheckErrors();
-        };
-
-    if( patron.billing_address() &&
-            address.id() == patron.billing_address().id() ) 
-        $n(row, 'ue_addr_billing_yes').checked = true;
-
-    if( patron.mailing_address() &&
-            address.id() == patron.mailing_address().id() ) 
-        $n(row, 'ue_addr_mailing_yes').checked = true;
-
-    $n(row, 'ue_addr_billing_yes').setAttribute('address', address.id());
-    $n(row, 'ue_addr_mailing_yes').setAttribute('address', address.id());
-
-    /* currently, non-owners cannot edit an address */
-    var disabled = (address.usr() != patron.id())
-
-    var fields = [
-        { 
-            required : false,
-            object    : address, 
-            key        : 'address_type', 
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_label',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : true,
-            object    : address, 
-            key        : 'street1', 
-            errkey    : 'ue_bad_addr_street',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_street1',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : false,
-            object    : address, 
-            key        : 'street2', 
-            errkey    : 'ue_bad_addr_street',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_street2',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : true,
-            object    : address, 
-            key        : 'city', 
-            errkey    : 'ue_bad_addr_city',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_city',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : false,
-            object    : address, 
-            key        : 'county', 
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_county',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : true,
-            object    : address, 
-            key        : 'state', 
-            errkey    : 'ue_bad_addr_state',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_state',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : true,
-            object    : address, 
-            key        : 'country', 
-            errkey    : 'ue_bad_addr_country',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_country',
-                type    : 'input',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : true,
-            object    : address, 
-            key        : 'post_code',
-            errkey    : 'ue_bad_addr_zip',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_zip',
-                type    : 'input',
-                disabled : disabled,
-                regex    : zipRegex,
-                onblur : function(f) {
-                    var v = uEditNodeVal(f);
-                    var req = new Request(ZIP_SEARCH, v);
-                    req.callback( 
-                        function(r) {
-                            var info = r.getResultObject();
-                            if(!info) return;
-                            var state = $n(f.widget.base, 'ue_addr_state');
-                            var county = $n(f.widget.base, 'ue_addr_county');
-                            var city = $n(f.widget.base, 'ue_addr_city');
-                            state.value = info.state;
-                            state.onchange();
-                            county.value = info.county;
-                            county.onchange();
-                            city.value = info.city;
-                            city.onchange();
-                        }
-                    );
-                    req.send();
-                }
-            }
-        },
-        { 
-            required : false,
-            object    : address, 
-            key        : 'within_city_limits',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_inc_yes',
-                type    : 'checkbox',
-                disabled : disabled,
-            }
-        },
-        { 
-            required : false,
-            object    : address, 
-            key        : 'valid',
-            widget    : {
-                base    : row,
-                name    : 'ue_addr_valid_yes',
-                type    : 'checkbox',
-                disabled : disabled,
-            }
-        }
-    ];
-
-    for( var f in fields ) {
-        dataFields.push(fields[f]);
-        uEditActivateField(fields[f]);
-    }
-}
-
-function uEditBuildPatronSCM(patron) {
-    /* get the list of pre-defined maps */
-    var fields = uEditFindFieldsByKey('stat_cat_entry');
-    var map;
-    var newmaps = [];
-
-    /* for each user stat cat, pop it off the list,
-    updated the existing stat map field to match
-    the popped map and shove the existing stat
-    map field onto the user's list of stat maps */
-    while( (map = patron.stat_cat_entries().pop()) ) {
-
-        var field = grep(fields, 
-            function(item) {
-                return (item.object.stat_cat() == map.stat_cat());
-            }
-        );
-
-        if(field) {
-            var val = map.stat_cat_entry();
-            field = field[0];
-            $n(field.widget.base, field.widget.name).value = val;
-            setSelector($n(field.widget.base, 'ue_stat_cat_selector'), val );
-            field.object.stat_cat_entry(val);
-            field.object.id(map.id());
-            newmaps.push(field.object);
-        }
-    }
-
-    for( var m in newmaps ) 
-        patron.stat_cat_entries().push(newmaps[m]);
-}
-
-
-function uEditBuildSCMField(statcat, row) {
-
-    var map = new actscecm();
-    map.stat_cat(statcat.id());
-    map.target_usr(patron.id());
-
-    var field = {
-        required : false,
-        object    : map,
-        key        : 'stat_cat_entry',
-        widget    : {
-            base    : row,
-            name    : 'ue_stat_cat_newval',
-            type    : 'input',
-
-            onpostchange : function( field, newval ) {
-
-                /* see if the current map already resides in 
-                    the patron entry list */
-                var exists = grep( patron.stat_cat_entries(),
-                    function(item) {
-                        return (item.stat_cat() == statcat.id()); 
-                    }
-                );
-
-                if(newval) {
-                    map.isdeleted(0);
-                    setSelector($n(row, 'ue_stat_cat_selector'), newval);
-                }
-
-                if(exists) {
-                    if(!newval) {
-
-                        /* if the map is new but currently contains no value
-                            remove it from the set of new maps */
-                        if(map.isnew()) {
-                            patron.stat_cat_entries(
-                                grep( patron.stat_cat_entries(),
-                                    function(item) {
-                                        return (item.stat_cat() != map.stat_cat());
-                                    }
-                                )
-                            );
-
-                        } else {
-                            map.isdeleted(1);
-                            map.ischanged(0);
-                        }
-                    } 
-
-                } else {
-
-                    /* map does not exist in the map array but now has data */
-                    if(newval) { 
-                        map.isnew(1);
-                        if(!patron.stat_cat_entries())
-                            patron.stat_cat_entries([]);
-                        patron.stat_cat_entries().push(map);
-                    }
-                }
-            }
-        }
-    }
-
-    dataFields.push(field);
-}
-
-
-
-/** Run this after a new ident type is selected */
-function _uEditIdentPostchange(type, field, newval) {
-
-    if(!newval) return;
-
-    /* When the ident type is changed, we change the
-    regex on the ident_value to match the selected type */
-    var vfname = 'ident_value';
-    if(type == 'secondary') vfname = 'ident_value2';
-    var vfield = uEditFindFieldByKey(vfname);
-    var name = identTypesCache[uEditNodeVal(field)].name();
-
-    hideMe($(type+'_ident_ssn_help'));
-    hideMe($(type+'_ident_dl_help'));
-
-    if(name.match(/ssn/i)) {
-        vfield.widget.regex = ssnRegex;
-        vfield.errkey = 'ue_bad_ident_ssn';
-        unHideMe($(type+'_ident_ssn_help'));
-
-    } else {
-
-        if(name.match(/driver/i)) {
-            vfield.widget.regex = dlRegex;
-            vfield.errkey = 'ue_bad_ident_dl';
-            unHideMe($(type+'_ident_dl_help'));
-            if(!uEditNodeVal(vfield))
-                vfield.widget.node.value = defaultState + '-';
-
-        } else {
-            vfield.widget.regex = null;
-            vfield.errkey = null;
-        }
-    }
-
-    /* focus then valdate the value field */
-    vfield.widget.node.onchange();
-    vfield.widget.node.focus();
-}
-
-
-/* checks to see if the given address is shared by others.
- * if so, the address row is styled and ...
- */
-
-function uEditCheckSharedAddr(patron, address, tbody, row) {
-
-    if( address.isnew() || (patron.isnew() && !clone) ) return;
-
-    var req = new Request(FETCH_ADDR_MEMS, SESSION, address.id());
-    req.callback( 
-        function(r) {
-
-            var members = r.getResultObject();
-            var shared = false;
-
-            for( var m in members ) {
-                var id = members[m];
-
-                if( id != patron.id() ) {
-
-                    addCSSClass(row.getElementsByTagName('table')[0], 'shared_address');
-                    unHideMe($n(row, 'shared_row'));
-                    $n(row, 'ue_addr_delete').disabled = true;
-
-                    if( address.usr() != patron.id() ) {
-                        var button = $n(row, 'ue_addr_detach');
-                        unHideMe(button);
-                        button.onclick = 
-                            function() { uEditDeleteAddr( tbody, row, address, true ); }
-                    }
-
-                    shared = true;
-                    break;
-                }
-            }
-
-            if( shared ) {
-
-                /* if this is a shared address, set the owner field and 
-                    give the staff a chance to edit the owner if it's not this user */
-
-                var nnode = $n(row, 'addr_owner_name');
-                var link = $n(row, 'addr_owner');
-                var id = address.usr();
-            
-                if( id == patron.id() ) {
-            
-                    nnode.appendChild(text(
-                        patron.first_given_name() + ' ' + patron.family_name()));
-                    hideMe($n(row, 'owner_link_div'));
-            
-                } else {
-            
-                    var ses = cgi.param('ses'); 
-                    if (xulG) if (xulG.ses) ses = xulG.ses;
-                    if (xulG) if (xulG.params) if (xulG.params.ses) ses = xulG.params.ses;
-                    link.onclick = 
-                        function() { window.xulG.spawn_editor({ses:ses,usr:id}) };
-                
-                    if( userCache[id] ) {
-                        var usr = userCache[id];
-                        nnode.appendChild(text(
-                            usr.first_given_name() + ' ' +  usr.family_name()));
-                
-                    } else {
-                
-                        fetchFleshedUser( id, 
-                            function(usr) {
-                                userCache[usr.id()] = usr;
-                                nnode.appendChild(text(
-                                    usr.first_given_name() + ' ' + usr.family_name()));
-                            }
-                        );
-                    }
-                }
-            }
-        }
-    );
-
-    req.send();
-}
-
-
-
-
-var __lastdob;
-function uEditCheckDOB(field) {
-
-    var dob = uEditNodeVal(field);
-    var ident_field = uEditFindFieldByKey('ident_value2');
-
-    if(dob) {
-
-        /* don't bother if the data isn't valid */
-        if(!dob.match(field.widget.regex)) 
-            return;
-
-        if( dob == __lastdob ) return;
-
-        __lastdob = dob;
-
-        var parts = dob.split(/-/);
-        parts[2] = parts[2].replace(/[T ].*/,'');
-        dob = buildDate( parts[0], parts[1], parts[2] );
-
-        var today = new Date();
-
-        if(!dob || dob > today) {
-            addCSSClass(field.widget.node, CSS_INVALID_DATA);
-            alertId('ue_bad_date');
-            return;
-        }
-
-        var base = new Date();
-        var age;
-        if(orgSettings['global.juvenile_age_threshold'])
-            age = orgSettings['global.juvenile_age_threshold'].value;
-        else age = DEFAULT_ADULT_AGE;
-        base.setTime(base.getTime() - Number(interval_to_seconds(age) + '000'));
-
-
-        unHideMe(ident_field.widget.node.parentNode.parentNode.parentNode);
-        if( dob < base ) { /* patron is of age */
-            ident_field.required = false;
-            uEditFindFieldByKey('juvenile').widget.node.checked = false;
-            if(!uEditNodeVal(ident_field))
-                hideMe(ident_field.widget.node.parentNode.parentNode.parentNode);
-            return;
-        }
-
-    } else {
-        // no DOB and we are not flagged as a juvenile
-        if(uEditFindFieldByKey('juvenile').widget.node.checked == false) {
-            if(!uEditNodeVal(ident_field))
-                hideMe(ident_field.widget.node.parentNode.parentNode.parentNode);
-            return;
-        }
-    }
-
-    unHideMe(ident_field.widget.node.parentNode.parentNode.parentNode);
-    if(!uEditFindFieldByKey('juvenile').widget.node.checked)
-        uEditFindFieldByKey('juvenile').widget.node.checked = true;
-    ident_field.required = true;
-    uEditCheckErrors();
-}
-
-
-
diff --git a/Open-ILS/xul/staff_client/server/patron/ue_ui.js b/Open-ILS/xul/staff_client/server/patron/ue_ui.js
deleted file mode 100644
index e9a8202..0000000
--- a/Open-ILS/xul/staff_client/server/patron/ue_ui.js
+++ /dev/null
@@ -1,468 +0,0 @@
-/* -----------------------------------------------------------------------
-    UI code for the user editor.  Handles breaking up the components
-    into a wizard-like interface.
-    ----------------------------------------------------------------------- */
-
-
-var pages = [ 
-    'uedit_userid', 
-    'uedit_contact_info', 
-    'uedit_addresses', 
-    'uedit_groups', 
-    'uedit_stat_cats', 
-    'uedit_surveys',
-    'uedit_finalize',
-    ];
-
-/* ID's of objects that should be focused when their page is made visible */
-var pageFocus = [
-    'ue_barcode',
-    'ue_email',
-    'ue_addr_label_1',
-    'ue_profile',
-    'ue_stat_cat_selector_1',
-    'ue_survey_selector_1',
-    'ue_view_summary'
-];
-
-
-function uEditNext() {
-    var i = _findActive();
-    if( i < (pages.length - 1)) uEditShowPage(pages[i+1]);
-}
-
-
-function uEditPrev() {
-    var i = _findActive();
-    if( i > 0 ) uEditShowPage(pages[i-1]);
-}
-
-function uEditCheckErrors() {
-    var errors = uEditGetErrorStrings();
-    if(errors) unHideMe($('ue_errors'));
-    else hideMe($('ue_errors'));
-}
-
-/*
-function uEditFetchError(id) { if($(id)) return $(id).innerHTML + "\n"; return "";}
-*/
-
-function uEditShowPage(id) {
-    if( id == null ) return;
-
-    for( var p in pages ) {
-        var page = pages[p];
-        hideMe($(page));
-        removeCSSClass($(page+'_label'), 'label_active');
-    }
-
-    var idx = _findPageIdx(id);
-
-    unHideMe($(id));
-    addCSSClass($(id+'_label'), 'label_active');
-    var fpage = pageFocus[idx];
-
-    var pnode = $(fpage);
-    if( id == 'uedit_addresses' ) 
-        pnode = $n( $('ue_address_tbody').
-            getElementsByTagName('tr')[0], 'ue_addr_label');
-
-    if(pnode) { 
-        pnode.focus(); 
-        try{pnode.select()}catch(e){} 
-    }
-
-    unHideMe($('ue_back'));
-    unHideMe($('ue_fwd'));
-
-    if(idx == 0) hideMe($('ue_back'));
-    if(idx == (pages.length-1)) hideMe($('ue_fwd'));
-}
-
-function _findActive() {
-    for( var p in pages ) {
-        if(! $(pages[p]).className.match(/hide_me/) )
-            return parseInt(p);
-    }
-    return null;
-}
-
-function _findPageIdx(name) {
-    for( var i in pages ) {
-        var page = pages[i];
-        if( page == name ) return i;
-    }
-    return -1;
-}
-
-/* ------------------------------------------------------------------------------ */
-/* Below are the various UI components built from retrieved data */
-/* ------------------------------------------------------------------------------ */
-
-
-/* org selector */
-function uEditBuildLibSelector( node, depth, selector ) {
-    if(!selector) selector = $('ue_org_selector');
-    if(!node) { depth = 0; node = globalOrgTree; }
-    var opt = insertSelectorVal( 
-        selector, -1, node.name(), node.id(), null, depth++ );
-    if(!findOrgType(node.ou_type()).can_have_users()) opt.disabled = true; 
-    if( node.id() == USER.ws_ou() ) 
-        setSelector(selector, node.id());
-
-    for( var c in node.children() ) 
-        uEditBuildLibSelector(node.children()[c], depth, selector);
-}
-
-
-/* group tree selector */
-function uEditDrawGroups(tree, depth, selector, drawme) {
-    if(!selector) {
-        selector = $('ue_profile');
-        depth = 0;
-    }
-    groupsCache[tree.id()] = tree;
-
-    /* if the staff does not have perms to access this group, 
-        remove it from the tree and don't add it's children */
-    var perm = uEditFindGroupPerm(tree);
-    var org = PERMS[perm];
-    if( org == -1 ) drawme = false;
-
-    if( drawme ) {
-        var opt = insertSelectorVal( selector, -1, tree.name(), tree.id(), null, depth++ );    
-        if(!isTrue(tree.usergroup())) opt.disabled = true;
-    }
-
-    for( var c in tree.children() ) 
-        uEditDrawGroups( tree.children()[c], depth, selector, drawme );
-}
-
-
-function uEditFindGroupPerm(group) {
-    if(!group) return null;
-    if( group.application_perm() ) 
-        return group.application_perm();
-    return uEditFindGroupPerm(groupsCache[group.parent()]);
-}
-
-
-/* user identification types */
-function uEditDrawIDTypes(types) {
-    var pri_sel = $('ue_primary_ident_type');
-    //var sec_sel = $('ue_secondary_ident_type');
-    var idx = 1;
-    for( var t in types ) {
-        var type = types[t];
-        if(!type.name()) continue;
-        identTypesCache[type.id()] = type;
-        setSelectorVal( pri_sel, idx, type.name(), type.id() );
-        //setSelectorVal( sec_sel, idx++, type.name(), type.id() );
-        idx++;
-    }
-}
-
-/* user statistical catagories */
-function uEditDrawStatCats(cats) {
-    var tbody = $('ue_stat_cat_tbody');
-    var templ = tbody.removeChild($('ue_stat_cat_row'));
-
-    for( var c in cats ) {
-        var row = templ.cloneNode(true);
-        uEditInsertCat( row, cats[c], c );
-        tbody.appendChild(row);
-    }
-}
-
-
-function uEditInsertCat( row, cat, idx ) {
-
-    cat.entries().sort(  /* sort the entries by value */
-        function( a, b ) { 
-            if( !a.value() ) return -1;
-            if( !b.value() ) return 1;
-            if( (a.value()+'').toLowerCase() > (b.value()+'').toLowerCase()) return 1;
-            if( (a.value()+'').toLowerCase() < (b.value()+'').toLowerCase()) return -1;
-            return 0;
-        }
-    );
-
-    statCatsCache[cat.id()] = cat;
-
-    /* register the new map object */
-    uEditBuildSCMField(cat, row);
-
-    var newval = $n(row, 'ue_stat_cat_newval');
-    var selector = $n(row, 'ue_stat_cat_selector');
-
-    selector.onchange = function() { 
-        newval.value = getSelectorVal(selector);
-        if(newval.onchange) newval.onchange();
-    }
-
-    if( idx == 0 ) selector.id = 'ue_stat_cat_selector_1'; 
-
-    $n(row, 'ue_stat_cat_name').appendChild(text(cat.name()));
-    $n(row, 'ue_stat_cat_owner').appendChild(
-        text(fetchOrgUnit(cat.owner()).shortname()));
-
-    for( var e in cat.entries() ) {
-        var entry = cat.entries()[e];
-        setSelectorVal( selector, 
-            (parseInt(e)+1), entry.value(), entry.value() );
-    }
-}
-
-/* draw the surveys */
-function uEditDrawSurveys(surveys) {
-
-	patron.survey_responses([]); /* clear out all surveys up front */
-
-	var div = $('uedit_surveys');
-	var table = div.removeChild($('ue_survey_table'));
-	if( surveys.length == 0 ) unHideMe($('uedit_no_surveys'));
-
-    for( var s in surveys ) {
-        var survey = surveys[s];
-        surveysCache[survey.id()] = survey;
-        var clone = table.cloneNode(true);
-        uEditInsertSurvey( div, clone, survey, s );
-        div.appendChild(clone);
-    }
-}
-
-/* insert the servey then insert each of that surveys questions */
-function uEditInsertSurvey( div, table, survey, sidx ) {
-
-    $n(table, 'ue_survey_name').appendChild(text(survey.name()));
-    $n(table, 'ue_survey_desc').appendChild(text(survey.description()));
-
-    var tbody = $n(table, 'ue_survey_tbody');
-    var templ = tbody.removeChild($n(table, 'ue_survey_row'));
-
-    for( var q in survey.questions() ) {
-        var row = templ.cloneNode(true);
-        var quest = survey.questions()[q];
-        uEditInsertSurveyQuestion( row, survey, quest );
-        tbody.appendChild(row);
-    }
-}
-
-function uEditInsertSurveyQuestion( row, survey, question ) {
-
-    var selector = $n(row, 'ue_survey_answer');
-    row.setAttribute('question', question.id());
-    $n(row, 'ue_survey_question').appendChild(text(question.question()));
-
-    for( var a in question.answers() ) {
-        var answer = question.answers()[a];
-        surveyAnswersCache[answer.id()] = answer;
-        insertSelectorVal(selector, -1, answer.answer(), answer.id() );
-    }
-
-    surveyQuestionsCache[question.id()] = question;
-
-    if( patron.isnew() && isTrue(survey.required()) ) 
-        addCSSClass(selector, 'invalid_value');
-
-    selector.onchange = function() {
-
-		/* remove any existing responses for this question */
-		patron.survey_responses(
-			grep( patron.survey_responses(),
-				function(item) {
-					return (item.question() != row.getAttribute('question'));
-				}
-			)
-		);
-
-
-        if(!patron.survey_responses())
-            patron.survey_responses([]);
-
-        var val = getSelectorVal(selector);
-
-        if( patron.isnew() && isTrue(survey.required()) ) {
-            if(val)
-                removeCSSClass(selector, 'invalid_value');
-            else 
-                addCSSClass(selector, 'invalid_value');
-            uEditCheckErrors();
-        }
-
-        if(!val) return;
-
-        var resp    = new asvr();
-        resp.isnew(1);
-        resp.survey(survey.id());
-        resp.usr(patron.id());
-        resp.question(row.getAttribute('question'));
-        resp.answer(val);
-        patron.survey_responses().push( resp );
-    }
-}
-
-
-
-
-
-/* -----------------------------------------------------------------------
-    Spit out the patron info to the summary display tables...
-    ----------------------------------------------------------------------- */
-
-function uEditShowSummary() {
-    hideMe($('main_div_container'));
-    unHideMe($('summary_div_container'));
-
-    for( var f in dataFields ) {
-
-        var field = dataFields[f];
-        if( field.object == patron ) {
-
-            var val = uEditNodeVal(field);
-
-            if(    field.key == 'profile'        ||
-                    field.key == 'home_ou'        ||
-                    field.key == 'ident_type'    ||
-                    field.key == 'ident_type2') {
-
-                val = getSelectorName($(field.widget.id));
-            }
-
-            var node = $('ue_summary_'+field.key);
-            if(node) appendClear(node, text(val));
-        }
-
-        if( field.object == patron.card() )
-            appendClear($('ue_summary_barcode'), text(uEditNodeVal(field)));
-
-    }
-
-    var table = $('ue_summary_table');
-    uEditFleshSummaryAddresses( table, patron );
-    uEditFleshSummaryStatCats( table, patron );
-    uEditFleshSummarySurveys( table, patron );
-}
-
-
-
-var uEditSummaryAddrRow;
-function uEditFleshSummaryAddresses( table, patron ) {
-
-    var addrtbody = $n(table, 'ue_summary_addr_tbody');
-    if(!uEditSummaryAddrRow)
-        uEditSummaryAddrRow = 
-            addrtbody.removeChild($n(addrtbody, 'ue_summary_addr_row'));
-    var rowtmpl = uEditSummaryAddrRow;
-    removeChildren(addrtbody);
-
-    for( var a in patron.addresses() ) {
-        var address = patron.addresses()[a];
-        var row = rowtmpl.cloneNode(true);
-        uEditFleshSummaryAddr( address, patron, row );
-        addrtbody.appendChild(row);
-        if(address.isdeleted()) addCSSClass(row, 'deleted');
-    }
-}
-
-
-function uEditFleshSummaryAddr( address, patron, row ) {
-    var yes = $('yes').innerHTML;
-    var no = $('no').innerHTML;
-
-    $n(row, 'label').appendChild(text(address.address_type()));
-    $n(row, 'street1').appendChild(text(address.street1()));
-    $n(row, 'street2').appendChild(text(address.street2()));
-    $n(row, 'city').appendChild(text(address.city()));
-    $n(row, 'county').appendChild(text(address.county()));
-    $n(row, 'state').appendChild(text(address.state()));
-    $n(row, 'country').appendChild(text(address.country()));
-    $n(row, 'zip').appendChild(text(address.post_code()));
-    $n(row, 'valid').appendChild(text( (isTrue(address.valid())) ? yes : no ));
-    $n(row, 'incorporated').appendChild(text( (isTrue(address.within_city_limits())) ? yes : no ));
-
-    var mid = patron.mailing_address();
-    if( typeof patron.mailing_address() == 'object' ) 
-        mid = patron.mailing_address().id();
-    $n(row, 'mailing').appendChild(text((mid == address.id()) ? yes : no ));
-
-    var bid = patron.billing_address();
-    if( typeof patron.billing_address() == 'object' ) 
-        bid = patron.billing_address().id();
-    $n(row, 'billing').appendChild(text((bid == address.id()) ? yes : no ));
-}
-
-
-
-var uEditSummaryStatCatRow;
-function uEditFleshSummaryStatCats( table, patron ) {
-    var tbody = $n(table, 'ue_summary_stats_tbody');
-
-    if(!uEditSummaryStatCatRow)
-        uEditSummaryStatCatRow = 
-            tbody.removeChild($n(tbody, 'ue_summary_stats_row'));
-    var rowtmpl = uEditSummaryStatCatRow;
-    removeChildren(tbody);
-
-    for( var s in patron.stat_cat_entries() ) {
-        row = rowtmpl.cloneNode(true);
-        var entry = patron.stat_cat_entries()[s];
-        var cat = statCatsCache[entry.stat_cat()];
-        $n(row, 'ue_summary_stat_name').appendChild(text(cat.name()));
-        $n(row, 'ue_summary_stat_value').appendChild(text(entry.stat_cat_entry()));
-        row.setAttribute('statcat', entry.stat_cat());
-        if( entry.isdeleted() ) addCSSClass(row, 'deleted'); 
-        tbody.appendChild(row);
-    }
-
-    if( ! getElementsByTagNameFlat( tbody, 'tr' )[0] )
-        hideMe(tbody.parentNode);
-    else
-        unHideMe(tbody.parentNode);
-}
-
-
-
-var uEditSummarySurveyRow;
-function uEditFleshSummarySurveys( table, patron ) {
-
-    var tbody    = $n(table, 'ue_summary_survey_tbody');
-    if(!uEditSummarySurveyRow)
-        uEditSummarySurveyRow = 
-            tbody.removeChild($n(tbody, 'ue_summary_survey_row'));
-    var rowtmpl = uEditSummarySurveyRow;
-
-    removeChildren(tbody);
-
-    for( var r in patron.survey_responses() ) {
-        var row        = rowtmpl.cloneNode(true);
-        var resp        = patron.survey_responses()[r];
-        var survey    = surveysCache[resp.survey()];
-        var quest    = surveyQuestionsCache[resp.question()];
-        var answer    = surveyAnswersCache[resp.answer()];
-        $n(row, 'ue_summary_survey_name').appendChild(text(survey.name()));
-        $n(row, 'ue_summary_survey_question').appendChild(text(quest.question()));
-        $n(row, 'ue_summary_survey_answer').appendChild(text(answer.answer()));
-        tbody.appendChild(row);
-    }
-
-    if( ! getElementsByTagNameFlat(tbody, 'tr')[0])
-        hideMe(tbody.parentNode);
-    else
-        unHideMe(tbody.parentNode);
-}
-
-
-function uEditDrawNetLevels(netLevels) {
-    var sel = $('ue_net_level');
-    iterate( netLevels, 
-        function(i) {
-            insertSelectorVal( sel, -1, i.name(), i.id() );
-        }
-    );
-    setSelector(sel, defaultNetLevel);
-}
-
-
-
-
diff --git a/Open-ILS/xul/staff_client/server/patron/user_edit.js b/Open-ILS/xul/staff_client/server/patron/user_edit.js
index 8ce5769..39d0001 100644
--- a/Open-ILS/xul/staff_client/server/patron/user_edit.js
+++ b/Open-ILS/xul/staff_client/server/patron/user_edit.js
@@ -50,7 +50,7 @@ function set_work_ou(row) {
 function set_perm(row) {
     var pid = findNodeByName(row,'p.code').getAttribute('permid');
     var papply = findNodeByName(row,'p.id').checked;
-    var pdepth = findNodeByName(row,'p.depth').options[findNodeByName(row,'p.depth').selectedIndex].value;
+    var pdepth = findNodeByName(row,'p.depth').value;
     var pgrant = findNodeByName(row,'p.grantable').checked;
 
     var p;
@@ -145,28 +145,9 @@ function save_user () {
     return false;
 }
 
-var adv_mode = true;
-function apply_adv_mode (root) {
-    adv_items = findNodesByClass(root,'advanced');
-    for (var i in adv_items) {
-        adv_mode ?
-            removeCSSClass(adv_items[i], 'hideme') :
-            addCSSClass(adv_items[i], 'hideme');
-    }
-}
-
 function init_editor (u) {
     
-    var x = document.getElementById('editor').elements;
-    
     cgi = new CGI();
-    if (cgi.param('adv')) adv_mode = true; 
-    try {
-        if (xulG) if (xulG.adv) adv_mode = true;
-        if (xulG) if (xulG.params) if (xulG.params.adv) adv_mode = true;
-    } catch (e) {}
-
-    apply_adv_mode(document.getElementById('editor'));
 
     ses_id = cgi.param('ses'); 
     try {
@@ -199,20 +180,11 @@ function init_editor (u) {
         alert(E);
     }
 
-    if (user.usrname()) x['user.usrname'].value = user.usrname();
-    x['user.usrname'].setAttribute('onchange','user.usrname(this.value)');
-
-    if (user.card() && user.card().barcode()) x['user.card.barcode'].value = user.card().barcode();
-    x['user.card.barcode'].setAttribute('onchange','user.card().barcode(this.value)');
-
-    if (user.first_given_name()) x['user.first_given_name'].value = user.first_given_name();
-    x['user.first_given_name'].setAttribute('onchange','user.first_given_name(this.value)');
-
-    if (user.second_given_name()) x['user.second_given_name'].value = user.second_given_name();
-    x['user.second_given_name'].setAttribute('onchange','user.second_given_name(this.value);');
-
-    if (user.family_name()) x['user.family_name'].value = user.family_name();
-    x['user.family_name'].setAttribute('onchange','user.family_name(this.value)');
+    if (user.usrname()) $('user.usrname').value = user.usrname();
+    if (user.card() && user.card().barcode()) $('user.card.barcode').value = user.card().barcode();
+    if (user.first_given_name()) $('user.first_given_name').value = user.first_given_name();
+    if (user.second_given_name()) $('user.second_given_name').value = user.second_given_name();
+    if (user.family_name()) $('user.family_name').value = user.family_name();
 
     // grab the editing staff user object
     req = new RemoteRequest( 'open-ils.auth', 'open-ils.auth.session.retrieve', ses_id );
@@ -255,14 +227,14 @@ function init_editor (u) {
         perm_list = req.getResultObject();
     }
 
-    f = document.getElementById('permissions');
+    f = $('permissions');
     while (f.firstChild) f.removeChild(f.lastChild);
 
     var rcount = 0;
     for (var i in perm_list.sort(function(a,b){ if (a.code() < b.code()) return -1;return 1; }))
         display_perm(f,perm_list[i],staff_perms, rcount++);
 
-    f = document.getElementById('work_ous');
+    f = $('work_ous');
     while (f.firstChild) f.removeChild(f.lastChild);
 
     //flatten the ou tree, keep only those with can_hav_users = true
@@ -270,7 +242,7 @@ function init_editor (u) {
     trim_ou_tree( [work_ou_tree], work_ou_list );
 
     rcount = 0;
-    for (var i in work_ou_list.sort( function(a,b){ if (a.name() < b.name()) return -1;return 1; }) )
+    for (var i in work_ou_list.sort( function(a,b){ if (a.shortname() < b.shortname()) return -1;return 1; }) )
         display_work_ou(f,work_ou_list[i], rcount++);
 
     return true;
@@ -298,29 +270,29 @@ function trim_ou_tree (tree, list) {
 
 function display_work_ou (root,ou_def,r) {
 
-    var wrow = findNodeByName(document.getElementById('work_ou-tmpl'), 'wrow').cloneNode(true);
+    var wrow = $('work_tmpl').cloneNode(true);
+    wrow.id = null;
+    if (r % 2) wrow.setAttribute('class', 'odd');
     root.appendChild(wrow);
 
-    var label_cell = findNodeByName(wrow,'label');
-    findNodeByName(label_cell,'a.name').appendChild(text(ou_def.name()));
-    findNodeByName(label_cell,'a.shortname').appendChild(text(ou_def.shortname()));
-    if (r % 2) label_cell.className += ' odd';
+    findNodeByName(wrow,'a.name').value = ou_def.name();
+    findNodeByName(wrow,'a.shortname').value = ou_def.shortname();
 
-    var apply_cell = findNodeByName(wrow,'wapply');
-    findNodeByName(apply_cell,'a.id').setAttribute('workou_id', ou_def.id());
-    if (r % 2) apply_cell.className += ' odd';
+    findNodeByName(wrow,'a.id').setAttribute('workou_id', ou_def.id());
 
     var has_it = grep(
         function(x){ return x.work_ou() == ou_def.id() },
         user_work_ous
     ).length;
 
-    findNodeByName(apply_cell,'a.id').checked = has_it > 0 ? true : false;
+    findNodeByName(wrow,'a.id').checked = has_it > 0 ? true : false;
 }
 
 function display_perm (root,perm_def,staff_perms, r) {
 
-    var prow = findNodeByName(document.getElementById('permission-tmpl'), 'prow').cloneNode(true);
+    var prow = $('perm_tmpl').cloneNode(true);
+    prow.id = null;
+    if (r % 2) prow.setAttribute('class', 'odd');
     root.appendChild(prow);
 
     var all = false;
@@ -331,7 +303,6 @@ function display_perm (root,perm_def,staff_perms, r) {
         }
     }
 
-
     var sp,up;
     if (!all) {
         for (var i in staff_perms) {
@@ -347,26 +318,19 @@ function display_perm (root,perm_def,staff_perms, r) {
             up = user_perms[i];
     }
 
-
     var dis = false;
     if ((up && up.id() < 0) || !sp || !sp.grantable()) dis = true; 
     if (all) dis = false; 
 
-    var label_cell = findNodeByName(prow,'plabel');
-    findNodeByName(label_cell,'p.code').appendChild(text(perm_def.code()));
-    findNodeByName(label_cell,'p.code').setAttribute('title', perm_def.description());
-    findNodeByName(label_cell,'p.code').setAttribute('permid', perm_def.id());
-    if (r % 2) label_cell.className += ' odd';
-
-    var apply_cell = findNodeByName(prow,'papply');
-    findNodeByName(apply_cell,'p.id').disabled = dis;
-    findNodeByName(apply_cell,'p.id').checked = up ? true : false;
-    if (r % 2) apply_cell.className += ' odd';
-
-    var depth_cell = findNodeByName(prow,'pdepth');
-    findNodeByName(depth_cell,'p.depth').disabled = dis;
-    findNodeByName(depth_cell,'p.depth').id = 'perm-depth-' + perm_def.id();
-    if (r % 2) depth_cell.className += ' odd';
+    findNodeByName(prow,'p.code').value = perm_def.code();
+    findNodeByName(prow,'p.code').setAttribute('title', perm_def.description());
+    findNodeByName(prow,'p.code').setAttribute('permid', perm_def.id());
+
+    findNodeByName(prow,'p.id').disabled = dis;
+    findNodeByName(prow,'p.id').checked = up ? true : false;
+
+    findNodeByName(prow,'p.depth').disabled = dis;
+    findNodeByName(prow,'p.depth').id = 'perm-depth-' + perm_def.id();
     selectBuilder(
         'perm-depth-' + perm_def.id(),
         globalOrgTypes,
@@ -377,19 +341,17 @@ function display_perm (root,perm_def,staff_perms, r) {
           empty_value        : '',
           clear            : true }
     );
-    
-    var grant_cell = findNodeByName(prow,'pgrant');
-    findNodeByName(grant_cell,'p.grantable').disabled = dis;
-    findNodeByName(grant_cell,'p.grantable').checked = up ? (up.grantable() ? true : false) : false;
-    if (r % 2) grant_cell.className += ' odd';
 
-}
+    findNodeByName(prow,'p.grantable').disabled = dis;
+    findNodeByName(prow,'p.grantable').checked = up ? (up.grantable() != 0 ? true : false) : false;
 
+}
 
 function selectBuilder (id, objects, def, args) {
     var label_field = args['label_field'];
     var value_field = args['value_field'];
     var depth = args['depth'];
+    var newOpt;
 
     if (!depth) depth = 0;
 
@@ -399,16 +361,13 @@ function selectBuilder (id, objects, def, args) {
 
     var sel = id;
     if (typeof sel != 'object')
-        sel = document.getElementById(sel);
-
+        sel = $(sel);
     if (args['clear']) {
-        for (var o in sel.options) {
-            sel.options[o] = null;
-        }
+        sel.removeAllItems()
         args['clear'] = false;
         if (args['empty_label']) {
-            sel.options[0] = new Option( args['empty_label'], args['empty_value'] );
-            sel.selectedIndex = 0;
+            newOpt = sel.appendItem(args['empty_label'], args['empty_value']);
+            sel.selectedItem = newOpt;
         }
     }
 
@@ -422,27 +381,22 @@ function selectBuilder (id, objects, def, args) {
         if (typeof v == 'function')
             v = objects[i][value_field]();
 
-        var opt = new Option( l, v );
+        newOpt = sel.appendItem(l,v);
 
         if (depth) {
             var d = 10 * depth;
-            opt.style.paddingLeft = '' + d + 'px';
+            newOpt.style.paddingLeft = '' + d + 'px';
         }
 
-        sel.options[sel.options.length] = opt;
-
-
         if (typeof def == 'object') {
             for (var j in def) {
                 if (v == def[j]) {
-                    opt.selected = true;
-                    sel.value = v;
+                    sel.selectedItem = newOpt;
                 }
             }
         } else {
             if (v == def) {
-                opt.selected = true;
-                sel.value = v;
+                sel.selectedItem = newOpt;
             }
         }
 
diff --git a/Open-ILS/xul/staff_client/server/patron/user_edit.xhtml b/Open-ILS/xul/staff_client/server/patron/user_edit.xhtml
deleted file mode 100644
index b93686d..0000000
--- a/Open-ILS/xul/staff_client/server/patron/user_edit.xhtml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version='1.0'?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window PUBLIC "" ""[
-    <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
-
-        <head>
-                <title>&staff.patron.user_edit.title;</title>
-                <script language='javascript' src='/opac/common/js/utils.js'> </script>
-                <script language='javascript' src='/opac/common/js//config.js'> </script>
-                <script language='javascript' src='/opac/common/js/CGI.js'> </script>
-
-                <script language='javascript' src='/opac/common/js/slimtree.js'> </script>
-                <script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
-                <script language='javascript' src='/opac/common/js/fmall.js'> </script>
-                <script language='javascript' src='/opac/common/js/fmgen.js'> </script>
-                <script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
-                <script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
-                <script language='javascript' src='/opac/common/js/org_utils.js'> </script>
-                <script language='javascript' src='/opac/common/js/init.js'> </script>
-                <script language='javascript' src='/opac/common/js/RemoteRequest.js'> </script>
-                <script language='javascript' src='/opac/common/js/sprintf.js'> </script>
-                <script language='javascript' src='user_edit.js'> </script>
-
-
-        <style>
-
-            .messagecatalog { -moz-binding: url( /xul/server/main/bindings.xml#messagecatalog ) }
-
-            .stay_hidden {        visibility: hidden;
-                        display: none;
-
-            }
-
-            .hideme {        visibility: hidden;
-                        display: none;
-            }
-
-            table {        border-collapse: collapse;
-                    margin-bottom: 10px;
-                    margin-top: 10px;
-            }
-
-            th {        
-                    white-space: nowrap;
-                    padding-top: 15px;
-                    padding-bottom: 10px;
-                    text-align: center;
-                    border-top: solid black 1px;
-            }
-
-            td.odd {    background-color: lightcyan; }
-
-            td.label {    text-align: right;
-                    padding-right: 10px;
-            }
-
-            td.value {    text-align: left;
-                    padding-left: 10px;
-            }
-
-            input[disabled='true'] { color: black; }
-
-        </style>
-        </head>
-
-    <div class="messagecatalog" id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties" />
-
-    <body onload="try { init_editor() } catch(E) { alert(js2JSON(E)); }">
-        <form method="GET" name="editor" id="editor" >
-
-        <table width="100%">
-            <tr>
-                <td class="label">&staff.patron.user_edit.user_name.label;</td>
-                <td class="value"><input disabled="true" type="text" name="user.usrname" id="user.usrname"/></td>
-                <td class="label">&staff.patron.user_edit.barcode.label;</td>
-                <td class="value"><input type="text" name="user.card.barcode" id="user.card.barcode" disabled="true"/></td>
-            </tr>
-            <tr>
-                <td class="label">&staff.patron.user_edit.firstname.label;</td>
-                <td class="value"><input disabled="true" type="text" name="user.first_given_name" id="user.first_given_name"/></td>
-                <td class="label">&staff.patron.user_edit.middlename.label;</td>
-                <td class="value"><input disabled="true" type="text" name="user.second_given_name" id="user.second_given_name"/></td>
-                <td class="label">&staff.patron.user_edit.lastname.label;</td>
-                <td class="value"><input disabled="true" type="text" name="user.family_name" id="user.family_name"/></td>
-            </tr>
-            <tr class='advanced hideme'>
-                <td class="value" colspan="6">
-                    <table width="100%">
-                        <thead>
-                            <tr>
-                                <th></th>
-                                <th>&staff.patron.user_edit.working_location.label;</th>
-                            </tr>
-                        </thead>
-                        <tbody id="work_ous" name="work_ous"/>
-                    </table>
-                </td>
-            </tr>
-            <tr class='advanced hideme'>
-                <td class="value" colspan="6">
-                    <table width="100%">
-                        <thead>
-                            <tr>
-                                <th>&staff.patron.user_edit.permission.label;</th>
-                                <th>&staff.patron.user_edit.applied.label;</th>
-                                <th>&staff.patron.user_edit.depth.label;</th>
-                                <th>&staff.patron.user_edit.grantable.label;</th>
-                            </tr>
-                        </thead>
-                        <tbody id="permissions" name="permissions"/>
-                    </table>
-                </td>
-            </tr>
-
-        </table>
-
-        <button onclick="save_user(); return false;">&staff.patron.user_edit.save.label;</button>
-        </form>
-
-
-        <div class='hideme' id="permission-tmpl">
-            <table>
-                <tr name='prow'>
-                    <td class="value" name='plabel'>
-                        <span name="p.code"></span>
-                    </td>
-                    <td class="value" name='papply'>
-                        <input type="checkbox" name="p.id" onclick="set_perm(this.parentNode.parentNode);"/>
-                    </td>
-                    <td class="value" name='pdepth'>
-                        <select onchange="set_perm(this.parentNode.parentNode);" name="p.depth"/>
-                    </td>
-                    <td class="value" name='pgrant'>
-                        <input type="checkbox" name="p.grantable" onclick="set_perm(this.parentNode.parentNode);"/>
-                    </td>
-                </tr>
-            </table>
-        </div>
-
-
-        <div class='hideme' id="work_ou-tmpl">
-            <table>
-                <tr name='wrow'>
-                    <td class="value" name='wapply'>
-                        <input type="checkbox" name="a.id" onclick="set_work_ou(this.parentNode.parentNode);"/>
-                    </td>
-                    <td class="value" name='label'>
-                        <span name="a.name"></span>
-                        (<span name="a.shortname"></span>)
-                    </td>
-                </tr>
-            </table>
-        </div>
-
-    </body>
-</html>
-
diff --git a/Open-ILS/xul/staff_client/server/patron/user_edit.xul b/Open-ILS/xul/staff_client/server/patron/user_edit.xul
new file mode 100644
index 0000000..0d9987c
--- /dev/null
+++ b/Open-ILS/xul/staff_client/server/patron/user_edit.xul
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: User Perm Editor -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/patron_display.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+    <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<window id="patron_barcode_entry_win" 
+    onload="try { init_editor(); } catch(E) { alert(js2JSON(E)); }"
+    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+    <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
+    <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
+    <script type='text/javascript' src='/opac/common/js/utils.js'/>
+    <script type='text/javascript' src='/opac/common/js//config.js'/>
+    <script type='text/javascript' src='/opac/common/js/CGI.js'/>
+    <script type='text/javascript' src='/opac/common/js/slimtree.js'/>
+    <script type='text/javascript' src='/opac/common/js/JSON_v1.js'/>
+    <script type='text/javascript' src='/opac/common/js/fmall.js'/>
+    <script type='text/javascript' src='/opac/common/js/fmgen.js'/>
+    <script type='text/javascript' src='/opac/common/js/opac_utils.js'/>
+    <script type='text/javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'/>
+    <script type='text/javascript' src='/opac/common/js/org_utils.js'/>
+    <script type='text/javascript' src='/opac/common/js/init.js'/>
+    <script type='text/javascript' src='/opac/common/js/RemoteRequest.js'/>
+    <script type='text/javascript' src='/opac/common/js/sprintf.js'/>
+
+    <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+    <script type='text/javascript' src='user_edit.js'/>
+
+    <groupbox>
+        <caption label="&staff.patron.user_edit.user_info.label;"/>
+        <grid>
+            <columns>
+                <column/>
+                <column flex="1"/>
+                <column/>
+                <column flex="1"/>
+                <column/>
+                <column flex="1"/>
+            </columns>
+            <rows>
+                <row>
+                    <label control="user.usrname" value="&staff.patron.user_edit.user_name.label;"/>
+                    <textbox disabled="true" id="user.usrname"/>
+                    <label control="user.card.barcode" value="&staff.patron.user_edit.barcode.label;"/>
+                    <textbox disabled="true" id="user.card.barcode"/>
+                </row>
+                <row>
+                    <label control="user.first_given_name" value="&staff.patron.user_edit.firstname.label;"/>
+                    <textbox disabled="true" id="user.first_given_name"/>
+                    <label control="user.second_given_name" value="&staff.patron.user_edit.middlename.label;"/>
+                    <textbox disabled="true" id="user.second_given_name"/>
+                    <label control="user.family_name" value="&staff.patron.user_edit.lastname.label;"/>
+                    <textbox disabled="true" id="user.family_name"/>
+                </row>
+            </rows>
+        </grid>
+    </groupbox>
+    <vbox flex="1" style="overflow: auto">
+        <groupbox>
+            <caption label="&staff.patron.user_edit.working_location.label;"/>
+            <grid>
+                <columns>
+                    <column/>
+                    <column flex="1"/>
+                    <column/>
+                </columns>
+                <rows>
+                    <row>
+                        <label value="&staff.patron.user_edit.working_shortname.label;" style="font-weight: bold"/>
+                        <label value="&staff.patron.user_edit.working_name.label;" style="font-weight: bold"/>
+                        <label value="&staff.patron.user_edit.working_ou.label;" style="font-weight: bold"/>
+                    </row>
+                    <rows id="work_ous"/>
+                </rows>
+            </grid>
+        </groupbox>
+        <groupbox>
+            <caption label="&staff.patron.user_edit.permission_list.label;"/>
+            <grid>
+                <columns>
+                    <column flex="1"/>
+                    <column/>
+                    <column/>
+                    <column/>
+                </columns>
+                <rows>
+                    <row>
+                        <label value="&staff.patron.user_edit.permission.label;" style="font-weight: bold"/>
+                        <label value="&staff.patron.user_edit.applied.label;" style="font-weight: bold"/>
+                        <label value="&staff.patron.user_edit.depth.label;" style="font-weight: bold"/>
+                        <label value="&staff.patron.user_edit.grantable.label;" style="font-weight: bold"/>
+                    </row>
+                    <rows id="permissions"/>
+                </rows>
+            </grid>
+        </groupbox>
+    </vbox>
+    <button oncommand="save_user(); return false;" label="&staff.patron.user_edit.save.label;"/>
+    <vbox style="display: none">
+        <row id="perm_tmpl">
+            <label name="p.code"/>
+            <checkbox name="p.id" oncommand="set_perm(this.parentNode)"/>
+            <menulist name="p.depth" oncommand="set_perm(this.parentNode)"/>
+            <checkbox name="p.grantable" oncommand="set_perm(this.parentNode)"/>
+        </row>
+        <row id="work_tmpl">
+            <label name="a.shortname"/>
+            <label name="a.name"/>
+            <checkbox name="a.id" oncommand="set_work_ou(this.parentNode)"/>
+        </row>
+    </vbox>
+</window>
+
diff --git a/Open-ILS/xul/staff_client/server/skin/patron_display.css b/Open-ILS/xul/staff_client/server/skin/patron_display.css
index ff2b541..ff0a7d6 100644
--- a/Open-ILS/xul/staff_client/server/skin/patron_display.css
+++ b/Open-ILS/xul/staff_client/server/skin/patron_display.css
@@ -96,3 +96,8 @@ row#row_billing_zip { padding-bottom: 10px; }
 
 .PATRON_JUVENILE .dob { color: purple; }
 .PATRON_JUVENILE label.juvenile_indicator { display: inline; color: purple; }
+
+
+/* New user perm editor stuff */
+row.odd { background-color: lightcyan; }
+rows#work_ous row, rows#permissions row { border-top: 1px solid #444444; }

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/locale/en-US/lang.dtd            |  106 +--
 .../staff_client/chrome/content/main/constants.js  |    2 +-
 Open-ILS/xul/staff_client/server/main/data.xul     |    1 -
 Open-ILS/xul/staff_client/server/patron/ue.js      |  824 --------------
 Open-ILS/xul/staff_client/server/patron/ue.xhtml   | 1008 -----------------
 .../xul/staff_client/server/patron/ue_config.js    | 1167 --------------------
 Open-ILS/xul/staff_client/server/patron/ue_ui.js   |  468 --------
 .../xul/staff_client/server/patron/user_edit.js    |  126 +--
 .../xul/staff_client/server/patron/user_edit.xhtml |  162 ---
 .../xul/staff_client/server/patron/user_edit.xul   |  124 +++
 .../staff_client/server/skin/patron_display.css    |    5 +
 11 files changed, 175 insertions(+), 3818 deletions(-)
 delete mode 100644 Open-ILS/xul/staff_client/server/patron/ue.js
 delete mode 100644 Open-ILS/xul/staff_client/server/patron/ue.xhtml
 delete mode 100644 Open-ILS/xul/staff_client/server/patron/ue_config.js
 delete mode 100644 Open-ILS/xul/staff_client/server/patron/ue_ui.js
 delete mode 100644 Open-ILS/xul/staff_client/server/patron/user_edit.xhtml
 create mode 100644 Open-ILS/xul/staff_client/server/patron/user_edit.xul


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list