From fefa24e2ff2ad4906cf5dafe1c34cd9aa8e26bfc Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 31 Aug 2010 21:22:45 +0000 Subject: [PATCH] disable non-usergroup profiles in user registration profile group selector git-svn-id: svn://svn.open-ils.org/ILS/trunk@17418 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/actor/user/register.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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 0c1015f2d..94f6e45f8 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -549,12 +549,7 @@ function fleshFMRow(row, fmcls, args) { if(value !== null) dijitArgs.value = value; - // 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, + var wargs = { idlField : fieldIdl, fmObject : fmObject, fmClass : fmcls, @@ -563,8 +558,18 @@ function fleshFMRow(row, fmcls, args) { dijitArgs : dijitArgs, orgDefaultsToWs : true, orgLimitPerms : ['UPDATE_USER'], - }); + }; + + if(fmfield == 'profile') { + // fetch profile groups non-async so existing expire_date is + // not overwritten when the profile groups arrive and update + wargs.forceSync = true; + wargs.disableQuery = {usergroup : 'f'}; + } else { + wargs.forceSync = false; + } + var widget = new openils.widget.AutoFieldWidget(wargs); widget.build(); // now put it back before we register the widget -- 2.11.0