LP#1402797 Renew instead of in/out when the item is already checked out to the user
authorMike Rylander <mrylander@gmail.com>
Fri, 30 Jan 2015 19:17:45 +0000 (14:17 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 25 Feb 2015 16:16:06 +0000 (11:16 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/circ/share/t_circ_exists_dialog.tt2
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index 3a8b5d1..f0b37fd 100644 (file)
         </div>
       </div>
       <div class="modal-footer">
-        <input type="submit" class="btn btn-primary" 
+        <input if="!sameUser" type="submit" class="btn btn-primary" 
             value="[% l('Normal Checkin then Checkout') %]"/>
+        <input ng-if="sameUser" type="submit" class="btn btn-primary" 
+            value="[% l('Renew') %]"/>
         <button class="btn btn-warning" 
             ng-click="cancel($event)">[% l('Cancel') %]</button>
       </div>
index 40552ab..ec1bcca 100644 (file)
@@ -851,7 +851,11 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) {
             }]
         }).result.then(
             function() {
-                
+                if (sameUser) {
+                    options.override = true;
+                    return service.renew(params, options);
+                }
+
                 return service.checkin(
                     {barcode : params.copy_barcode, noop : true}
                 ).then(function(checkin_resp) {