LP#1402797 Do not allow workstations as org units that cannot have user
authorMike Rylander <mrylander@gmail.com>
Thu, 19 Feb 2015 20:54:38 +0000 (15:54 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 25 Feb 2015 16:16:10 +0000 (11:16 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index 3a14bbe..8ceb795 100644 (file)
@@ -75,6 +75,7 @@
           <eg-org-selector 
             selected="contextOrg"
             hidden-test="wsOrgHidden">
+            disable-test="cant_have_users">
           </eg-org-selector>
         </div>
         <input type='text' class='form-control'  
index 51a4240..ae771ec 100644 (file)
@@ -85,6 +85,8 @@ function($scope , $window , $location , egCore , egConfirmDialog) {
         .then(function() { $scope.defaultWS = $scope.selectedWS });
     }
 
+    $scope.cant_have_users = function (id) { return !egCore.org.CanHaveUsers(id); };
+
     // redirect the user to the login page using the current
     // workstation as the workstation URL param
     $scope.useWS = function() {