From: Chris Sharp Date: Thu, 3 Jan 2019 13:07:42 +0000 (-0500) Subject: Revert "lp1712644 Prevent check out due date in past" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=617d626d217af403de5a663dd116461348d93067;p=evergreen%2Fpines.git Revert "lp1712644 Prevent check out due date in past" This reverts commit db6a5a5ad4cc11f2271bee504048bc35eac41342. --- diff --git a/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 index 92946df2ae..d4fce7c391 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2 @@ -30,8 +30,7 @@ id="patron-checkout-barcode" type="text"/> + ng-class="{disabled : disable_checkout()}" value="[% l('Submit') %]"/> @@ -76,11 +75,8 @@ [% l('Specific Due Date') %] --> -
- - +
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 9c079f963e..1cbb05e220 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -19,8 +19,6 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , due_date : new Date() }; - $scope.minDate = new Date(); - $scope.gridDataProvider = egGridDataProvider.instance({ get : function(offset, count) { return this.arrayNotifier($scope.checkouts, offset, count); @@ -33,8 +31,7 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , patronSvc.current.active() == 'f' || patronSvc.current.deleted() == 't' || patronSvc.current.card().active() == 'f' || - patronSvc.fetchedWithInactiveCard() || - $scope.outOfRange == true + patronSvc.fetchedWithInactiveCard() ); } diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index 250105a195..59ff1c8414 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -1350,11 +1350,6 @@ https://stackoverflow.com/questions/24764802/angular-js-automatically-focus-inpu minDate : $scope.minDate, maxDate : $scope.maxDate }; - - $scope.outOfRange = false; - - $scope.minDate = new Date(); - $scope.outOfRange = false; var maxDateObj = $scope.maxDate ? new Date($scope.maxDate) : null; var minDateObj = $scope.minDate ? new Date($scope.minDate) : null; @@ -1365,12 +1360,7 @@ https://stackoverflow.com/questions/24764802/angular-js-automatically-focus-inpu var bad = false; var newdate = new Date(n); if (maxDateObj && newdate.getTime() > maxDateObj.getTime()) bad = true; - if (minDateObj && newdate.getTime() < minDateObj.getTime()) { - if ((newdate.getMonth() != minDateObj.getMonth()) || - (newdate.getDate() != minDateObj.getDate())) { - bad = true; - } - } + if (minDateObj && newdate.getTime() < minDateObj.getTime()) bad = true; $scope.outOfRange = bad; } });