Revert "lp1712644 Prevent check out due date in past"
authorChris Sharp <csharp@georgialibraries.org>
Thu, 3 Jan 2019 13:07:42 +0000 (08:07 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 8 Jan 2019 21:21:08 +0000 (16:21 -0500)
This reverts commit db6a5a5ad4cc11f2271bee504048bc35eac41342.

Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js
Open-ILS/web/js/ui/default/staff/services/ui.js

index 92946df..d4fce7c 100644 (file)
@@ -30,8 +30,7 @@
           id="patron-checkout-barcode" type="text"/> 
 
         <input class="btn btn-default" type="submit" 
-          ng-disabled="disable_checkout()"
-          value="[% l('Submit') %]"/>
+          ng-class="{disabled : disable_checkout()}" value="[% l('Submit') %]"/>
 
       </div>
     </form>
           [% l('Specific Due Date') %]
         </label>
       </div> -->
-
       <div class="col-md-4">
-        <eg-date-input min-date="minDate" out-of-range="outOfRange"
-          ng-model="checkoutArgs.due_date" ng-disabled="!date_options.has_sticky_date" show-time-picker>
-        </eg-date-input>
+        <eg-date-input ng-model="checkoutArgs.due_date" ng-disabled="!date_options.has_sticky_date" show-time-picker></eg-date-input>
       </div>
 </div>
     </div>
index 9c079f9..1cbb05e 100644 (file)
@@ -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()
         );
     }
 
index 250105a..59ff1c8 100644 (file)
@@ -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;
                         }
                     });