webstaff: provide login type options for operator change
authorMike Rylander <mrylander@gmail.com>
Thu, 20 Oct 2016 20:57:54 +0000 (16:57 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 22 Nov 2016 19:10:04 +0000 (14:10 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/share/t_opchange.tt2
Open-ILS/web/js/ui/default/staff/services/navbar.js

index 030418a..3872441 100644 (file)
         <input ng-keyup="$event.keyCode == 13 ? ok() : null" type='password' ng-model="args.password" class="form-control"/>
       </div>
     </div>
+    <div class="row">
+      <div class="col-md-4">
+        [% l('Login Type:') %]
+      </div>
+      <div class="col-md-1"></div>
+      <div class="col-md-7">
+        <select class="form-control" required ng-model="args.type">
+          <option value="temp">[% l('Temporary') %]</option>
+          <option value="staff" selected>[% l('Staff') %]</option>
+          <option value="persist" selected>[% l('Persistent') %]</option>
+        </select>
+      </div>
+    </div>
   </div>
   <div class="modal-footer">
     [% dialog_footer %]
index 2bc6522..305a62c 100644 (file)
@@ -83,13 +83,14 @@ angular.module('egCoreMod')
                         templateUrl: './share/t_opchange',
                         controller:
                             ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
-                            $scope.args = {username : '', password : ''};
+                            $scope.args = {username : '', password : '', type : 'temp'};
                             $scope.focus = true;
                             $scope.ok = function() { $uibModalInstance.close($scope.args) }
                             $scope.cancel = function () { $uibModalInstance.dismiss() }
                         }]
                     }).result.then(function (args) {
                         if (!args || !args.username || !args.password) return;
+                        args.type = args.type || 'temp';
                         args.workstation = egCore.auth.workstation();
                         egCore.auth.opChange(args).then(
                             function() {