[open-ils-commits] r17418 - trunk/Open-ILS/web/js/ui/default/actor/user (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 31 17:22:51 EDT 2010


Author: erickson
Date: 2010-08-31 17:22:45 -0400 (Tue, 31 Aug 2010)
New Revision: 17418

Modified:
   trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
disable non-usergroup profiles in user registration profile group selector

Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2010-08-31 21:22:44 UTC (rev 17417)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js	2010-08-31 21:22:45 UTC (rev 17418)
@@ -549,12 +549,7 @@
     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 @@
         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



More information about the open-ils-commits mailing list