LP#1402797 Allow (and use) a default cancel cause for holds by passing around a scala...
authorMike Rylander <mrylander@gmail.com>
Fri, 20 Feb 2015 15:59:17 +0000 (10:59 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 25 Feb 2015 16:16:10 +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_cancel_hold_dialog.tt2
Open-ILS/web/js/ui/default/staff/circ/services/holds.js

index 81417f2..ed56d77 100644 (file)
@@ -15,7 +15,7 @@
         <div class="col-md-8">
           <select class="form-control" id="hold-cancel-reason"
             ng-model="args.cancel_reason"
-            ng-options="reason.label() for reason in args.cancel_reasons">
+            ng-options="reason.id() as reason.label() for reason in args.cancel_reasons">
           </select>
         </div>
       </div>
index e3e6206..5c0ac9d 100644 (file)
@@ -85,7 +85,7 @@ function($modal , $q , egCore , egConfirmDialog , egAlertDialog) {
                             egCore.net.request(
                                 'open-ils.circ', 'open-ils.circ.hold.cancel',
                                 egCore.auth.token(), hold_id,
-                                $scope.args.cancel_reason.id(), 
+                                $scope.args.cancel_reason,
                                 $scope.args.note
                             ).then(function(resp) {
                                 if (evt = egCore.evt.parse(resp)) {