[open-ils-commits] [GIT] Evergreen ILS branch master updated. 08ac09848368388b2f4265c9580183bf9c4c200e

Evergreen Git git at git.evergreen-ils.org
Thu Aug 1 07:32:08 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  08ac09848368388b2f4265c9580183bf9c4c200e (commit)
      from  cbff93285eeba03e9900dcef19a7631245669e16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 08ac09848368388b2f4265c9580183bf9c4c200e
Author: Kyle Huckins <khuckins at catalyte.io>
Date:   Thu May 23 20:53:11 2019 +0000

    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 <khuckins at catalyte.io>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

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 c2e0958c95..ca732aea4f 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 @@
   </div>
   <div class="pad-vert row">
     <div class="col-md-5">
-      <eg-date-input required ng-model="args.date"></eg-date-input>
+      <eg-date-input required min-date="minDate" out-of-range="outOfRange"
+          ng-model="args.date"></eg-date-input>
     </div>
   </div>
 </div>
 <div class="modal-footer">
-  <button class="btn btn-primary" ng-click="ok()">[% l('Submit') %]</button>
+  <button class="btn btn-primary" ng-click="ok()" ng-disabled="outOfRange">[% l('Submit') %]</button>
   <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
 </div>
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 209570973d..0a2caad72a 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"/> 
 
-        <input class="btn btn-default" type="submit" value="[% l('Submit') %]"/>
+        <input class="btn btn-default" type="submit"
+            ng-disabled="outOfRange" value="[% l('Submit') %]"/>
       </div>
     </form>
   </div>
@@ -33,7 +34,8 @@
       </div>
       <!-- FIXME: This needs a time component as well, but type="datetime" 
             is not yet supported by any browsers -->
-      <div><eg-date-input ng-model="renewalArgs.due_date"></eg-date-input>
+      <div><eg-date-input min-date="minDate" out-of-range="outOfRange"
+          ng-model="renewalArgs.due_date"></eg-date-input>
       </div>
     </div>
   </div>
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 f0a795fa2c..327eeb5fe6 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 86665574da..e15dd5e7be 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();

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/staff/circ/patron/t_renew_with_date_dialog.tt2    | 5 +++--
 Open-ILS/src/templates/staff/circ/renew/t_renew.tt2                 | 6 ++++--
 Open-ILS/web/js/ui/default/staff/circ/patron/items_out.js           | 2 ++
 Open-ILS/web/js/ui/default/staff/circ/renew/app.js                  | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list