[open-ils-commits] r15397 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 28 10:43:34 EST 2010
Author: erickson
Date: 2010-01-28 10:43:31 -0500 (Thu, 28 Jan 2010)
New Revision: 15397
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
don't assume a null org unit value should default to the users workstation org unit. that's misleading. created a new flag to force this assumption. when not set, the value remains null
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2010-01-28 15:22:13 UTC (rev 15396)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2010-01-28 15:43:31 UTC (rev 15397)
@@ -22,6 +22,8 @@
* orgLimitPerms -- If this field defines a set of org units and an orgLimitPerms
* is defined, the code will limit the org units in the set to those
* allowed by the permission
+ * orgDefaultsToWs -- If this is an org unit field and the widget has no value,
+ * set the value equal to the users's workstation org unit. Othwerwise, leave it null
* selfReference -- The primary purpose of an AutoFieldWidget is to render the value
* or widget for a field on an object (that may or may not link to another object).
* selfReference allows you to sidestep the indirection and create a selector widget
@@ -433,7 +435,7 @@
this.widget.parentField = 'parent_ou';
var user = new openils.User();
- if(this.widgetValue == null)
+ if(this.widgetValue == null && this.orgDefaultsToWs)
this.widgetValue = user.user.ws_ou();
// if we have a limit perm, find the relevent orgs (async)
More information about the open-ils-commits
mailing list