From: Kyle Huckins Date: Thu, 23 May 2019 20:53:11 +0000 (+0000) Subject: lp1034058 Disable Renewal Due Dates in the Past X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=08ac09848368388b2f4265c9580183bf9c4c200e lp1034058 Disable Renewal Due Dates in the Past Apply minimum date and an out of range flag to prevent selecting or inputting a past date when renewing items from Circulation->Renew Items or Patron->Items Out->Actions-> Renew With Specific Due Date. To test ------- [1] Create a loan. [2] From the patron's Item Out page, use the Renew With Specific Due Date action. Note that the date widget will allow you to specify a due date in the past. [3] From the Circulation -> Renew interface, note that the date widget will also let you specify a due date in the past. [4] Apply the patch and repeat steps #2 and #3. This time, a due date in the past cannot be entered, both via the calendar button and by direct entry in the text box. Signed-off-by: Kyle Huckins Signed-off-by: Galen Charlton Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/templates/staff/circ/patron/t_renew_with_date_dialog.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_renew_with_date_dialog.tt2 index c2e0958..ca732ae 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_renew_with_date_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_renew_with_date_dialog.tt2 @@ -13,11 +13,12 @@
- +
diff --git a/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 b/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 index 2095709..0a2caad 100644 --- a/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 +++ b/Open-ILS/src/templates/staff/circ/renew/t_renew.tt2 @@ -18,7 +18,8 @@ ng-model="renewalArgs.copy_barcode" id="patron-renewal-barcode" type="text"/> - + @@ -33,7 +34,8 @@ -
+
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js index f0a795f..327eeb5 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js @@ -477,6 +477,8 @@ function($scope , $q , $routeParams , $timeout , egCore , egUser , patronSvc , controller : [ '$scope','$uibModalInstance', function($scope , $uibModalInstance) { + $scope.outOfRange = false; + $scope.minDate = new Date(); $scope.args = { barcodes : barcodes, date : new Date() diff --git a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js index 8666557..e15dd5e 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js @@ -36,6 +36,8 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { egCore.hatch.getItem('circ.renew.strict_barcode') .then(function(sb){ $scope.strict_barcode = sb }); $scope.focusBarcode = true; + $scope.outOfRange = false; + $scope.minDate = new Date(); $scope.renewals = []; var today = new Date();