From 0f91216a4106ea4e0df4c4c9fc1be485c71bcc01 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 24 Feb 2010 19:30:44 +0000 Subject: [PATCH] fetch user groups non-async to prevent clobbering expire date when group dijit updates with async data. set required var before it's used. don't require values in the password field for existing users git-svn-id: svn://svn.open-ils.org/ILS/trunk@15635 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/actor/user/register.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 e5670d160..3c6c47cd9 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -425,6 +425,12 @@ function fleshFMRow(row, fmcls, args) { break; } + var required = row.getAttribute('required') == 'required'; + + // password data is not fetched/required/displayed for existing users + if(!patron.isnew() && 'passwd' == fmfield) + required = false; + var dijitArgs = { style: wstyle, required : required, @@ -436,8 +442,12 @@ function fleshFMRow(row, fmcls, args) { if(value !== null) dijitArgs.value = value; - var required = row.getAttribute('required') == 'required'; + // fetch profile groups non-async so existing expire_date is + // not overwritten when the profile groups arrive and update + var sync = (fmfield == 'profile') ? true : false; + var widget = new openils.widget.AutoFieldWidget({ + forceSync : sync, idlField : fieldIdl, fmObject : fmObject, fmClass : fmcls, -- 2.11.0