From 3195aace7a6e7e094619fcc11684f508e2f65661 Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Wed, 13 Sep 2017 13:07:29 -0400 Subject: [PATCH] LP#1706124: Make include inactive patrons checkbox sticky The state of the 'include inactive' checkbox on the patron search page will now be remembered when users return to the page. Many thanks to Cesar Velez, whose code for bug 1697754 inspired this patch! Signed-off-by: Kathy Lussier Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/share/t_patron_search_form.tt2 | 2 +- Open-ILS/web/js/ui/default/staff/services/patron_search.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/t_patron_search_form.tt2 b/Open-ILS/src/templates/staff/share/t_patron_search_form.tt2 index 816076c2e9..d84a2f8f81 100644 --- a/Open-ILS/src/templates/staff/share/t_patron_search_form.tt2 +++ b/Open-ILS/src/templates/staff/share/t_patron_search_form.tt2 @@ -139,7 +139,7 @@
diff --git a/Open-ILS/web/js/ui/default/staff/services/patron_search.js b/Open-ILS/web/js/ui/default/staff/services/patron_search.js index c27274ffda..78976713eb 100644 --- a/Open-ILS/web/js/ui/default/staff/services/patron_search.js +++ b/Open-ILS/web/js/ui/default/staff/services/patron_search.js @@ -745,7 +745,17 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, egCore.hatch.getItem('eg.circ.patron.search.show_extras') .then(function(val) {$scope.showExtras = val}); - // map form arguments into search params +// check searchArgs.inactive setting + egCore.hatch.getItem('searchArgs.inactive') + .then(function(searchInactive){ + if (searchInactive) $scope.searchArgs.inactive = searchInactive; + }); + + $scope.onSearchInactiveChanged = function(){ + egCore.hatch.setItem('searchArgs.inactive', $scope.searchArgs.inactive); + } + +// map form arguments into search params function compileSearch(args) { var search = {}; angular.forEach(args, function(val, key) { -- 2.11.0