[open-ils-commits] [GIT] Evergreen ILS branch rel_2_6 updated. 2c2d8a2d81cb1e6008d1ce983af0a400ee28599a
Evergreen Git
git at git.evergreen-ils.org
Thu Sep 18 17:00:21 EDT 2014
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, rel_2_6 has been updated
via 2c2d8a2d81cb1e6008d1ce983af0a400ee28599a (commit)
from fbf3adf7243f957ea6fef912d6f55e1b4a397d1e (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 2c2d8a2d81cb1e6008d1ce983af0a400ee28599a
Author: Jeff Godin <jgodin at tadl.org>
Date: Wed Oct 30 16:41:06 2013 -0400
LP#1246859: Improve username flow for staged users
Staged users in most cases have a username that consists of a UUID.
Rather than leave the UUID as their username or require staff to
clear the field and replace it with a barcode or other value, it
would be better to remove this username when loading the staged user
in the user editor.
This commit clears the username when loading a stage user if the
username looks like a UUID.
If a barcode has been staged for the loaded staged user, the
username will be populated with that value.
If there is no staged barcode, the username will remain blank and
will be populated using the standard method after staff enters a
value in the barcode field.
Signed-off-by: Jeff Godin <jgodin at tadl.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index fe5f0c9..3262870 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -578,6 +578,11 @@ function uEditLoadStageUser(stageUname) {
}
}
+ // Clear the usrname if it looks like a UUID
+ if (patron['usrname']().replace(/-/g,'').match(/[0-9a-f]{32}/)) {
+ patron['usrname']('');
+ }
+
// copy the data into our new address objects
// TODO: uses the first mailing address only
if(data.mailing_addresses.length) {
@@ -627,6 +632,10 @@ function uEditLoadStageUser(stageUname) {
var card = new fieldmapper.ac();
card.id(-1); // virtual ID
patron.card().barcode(data.cards[0].barcode());
+ // Set usrname to barcode if usrname is empty
+ if (patron.usrname() == '') {
+ patron.usrname(card.barcode());
+ }
}
return patron;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/actor/user/register.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list