From deedcced8d492884aab30fc85890a62a83cca54c Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 31 Mar 2015 16:46:32 -0400 Subject: [PATCH] webstaff: Honor "obscure DOB" YAOUS Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- .../src/templates/staff/circ/patron/t_summary.tt2 | 5 +++-- Open-ILS/web/js/ui/default/staff/circ/patron/app.js | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 index 55cbb6f13d..6a3d7f63a2 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 @@ -28,8 +28,9 @@
-
[% l('Date of Birth') %]
-
{{patron().dob() | date:'shortDate'}}
+ [% l('Date of Birth') %] +
[% l('Date of Birth') %]
+
{{patron().dob() | date:'shortDate'}}
[% l('Last Activity') %]
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js index aeea4edf4f..1b8083966c 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js @@ -611,6 +611,17 @@ function($scope, $q, $location , $filter, egCore, egUser, patronSvc) { return $q.when(); } + $scope._show_dob = {}; + $scope.show_dob = function (val) { + if ($scope.patron()) { + if (typeof val != 'undefined') $scope._show_dob[$scope.patron().id()] = val; + return $scope._show_dob[$scope.patron().id()]; + } + return !egCore.env.aous['circ.obscure_dob']; + } + + $scope.obscure_dob = function() { return egCore.env.aous['circ.obscure_dob']; } + $scope.now_show_dob = function() { return egCore.env.aous['circ.obscure_dob'] ? $scope.show_dob() : true; } $scope.patron = function() { return patronSvc.current } $scope.patron_stats = function() { return patronSvc.patron_stats } $scope.summary_stat_cats = function() { return patronSvc.summary_stat_cats } -- 2.43.2