LP#1714060 - fixes thinko when obeying patron.password.use_phone setting in patron...
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 28 Sep 2017 17:08:48 +0000 (13:08 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 17 Oct 2017 17:56:44 +0000 (13:56 -0400)
There was a bug, an undefined variable was being used to assign the last
four digits of the day_phone to usr.passwd when this library setting
was being used.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index c190f4c..861488d 100644 (file)
@@ -1721,7 +1721,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
                 if ($scope.patron.day_phone && 
                     $scope.patron.isnew && 
                     $scope.org_settings['patron.password.use_phone']) {
-                    $scope.patron.passwd = phone.substr(-4);
+                    $scope.patron.passwd = $scope.patron.day_phone.substr(-4);
                 }
             case 'evening_phone' : 
             case 'other_phone' :