From e69ce507e662562b8612bfe5b55dd23b4cb1f8f2 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 27 Dec 2017 15:58:15 -0500 Subject: [PATCH] PINES Cust: Reset Patron Search Form with Defaults Change code to refresh page instead of clearing individual fields, which resets fields to the defaults we want (inactive checked and org unit to consortium). Signed-off-by: Terran McCanna --- Open-ILS/web/js/ui/default/staff/services/patron_search.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 d2ebe6c3fa..27999d90d7 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 @@ -526,6 +526,9 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, home_ou : egCore.org.tree() }; + // PINES Customization - default to search inactive + $scope.searchArgs.inactive = true; + // last used patron search form element var lastFormElement; @@ -742,9 +745,12 @@ function($scope, $q, $routeParams, $timeout, $window, $location, egCore, } $scope.clearForm = function () { - $scope.searchArgs={}; - if (lastFormElement) lastFormElement.focus(); - } + //PINES Customization - instead of resetting fields, refresh page + //because this allows us to get the correct field defaults + //$scope.searchArgs={}; + //if (lastFormElement) lastFormElement.focus(); + $window.location.reload(); + } $scope.applyShowExtras = function($event, bool) { if (bool) { -- 2.11.0