unless otherwise specified, use the workstation ou as the value for the org unit...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 24 Mar 2009 21:27:18 +0000 (21:27 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 24 Mar 2009 21:27:18 +0000 (21:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12661 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js

index df2ad32..969781c 100644 (file)
@@ -251,11 +251,13 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
             this.widget.searchAttr = 'shortname';
             this.widget.labelAttr = 'shortname';
             this.widget.parentField = 'parent_ou';
+            var user = new openils.User();
+            if(this.widgetValue == null) 
+                this.widgetValue = user.user.ws_ou();
             
             // if we have a limit perm, find the relevent orgs (async)
             if(this.orgLimitPerms && this.orgLimitPerms.length > 0) {
                 this.async = true;
-                var user = new openils.User();
                 var self = this;
                 user.getPermOrgList(this.orgLimitPerms, 
                     function(orgList) {