From: Bill Erickson Date: Sun, 25 Oct 2015 15:42:11 +0000 (-0400) Subject: LP#1452950 patron reg additions (phone pw, hiding stuff) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bb0c48a7e27e1b59cf5bd6ab3f2c10ae4d03f04a;p=evergreen%2Fpines.git LP#1452950 patron reg additions (phone pw, hiding stuff) 1. Generate password from last 4 digits of phone number if library setting is present (patron.password.use_phone). 2. Only show "replace barcode" and invlidate buttons when editing an existing patron. 3. Address no longer defaults to within_city_limits, consistent with dojo version. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 index 2d8e8c3fe6..e6ffef49f9 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -75,6 +75,10 @@ focus-me="focus_usrname" ng-blur="usrname_changed(patron.usrname)" class="form-control" ng-model="[% model %]"/> + [% ELSIF field == 'day_phone' %] + [% ELSE %] @@ -88,7 +92,7 @@ [% IF field == 'barcode' %] - @@ -103,7 +107,7 @@ [% IF field.match('phone') OR field.match('email') %] - [% END %] diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js index 40809e58e3..52dd1f8eea 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js @@ -320,7 +320,7 @@ angular.module('egCoreMod') address_type : egCore.strings.REG_ADDR_TYPE, _is_mailing : true, _is_billing : true, - within_city_limits : true + within_city_limits : false }; var card = { @@ -659,6 +659,12 @@ function PatronRegCtrl($scope, $routeParams, $scope.patron.cards.push(new_card); } + $scope.day_phone_changed = function(phone) { + if (phone && $scope.org_settings['patron.password.use_phone']) { + $scope.patron.passwd = phone.substr(-4); + } + } + $scope.barcode_changed = function(bc) { if (!bc) return; egCore.net.request(