From: Galen Charlton <gmc@equinoxinitiative.org>
Date: Tue, 6 Feb 2018 20:58:57 +0000 (-0500)
Subject: LP#1743262: (follow-up) disable submit button if approval code not supplied
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6105bf23093781fcad169f7acd03736a11a4ab9d;p=evergreen%2Fjoelewis.git

LP#1743262: (follow-up) disable submit button if approval code not supplied

This patch causes the submit button to be disabled on the CC payment
dialog if the user specifies recording an externally-process CC payment
but has not yet supplied an approval code.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_cc_payment_dialog.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_cc_payment_dialog.tt2
index e25bd86076..1551f56b94 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_cc_payment_dialog.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_cc_payment_dialog.tt2
@@ -110,7 +110,7 @@
   </div><!--panel-->
 </div><!--modal-body-->
 <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="context.cc.where_process == 0 && !context.cc.approval_code">[% l('Submit') %]</button>
   <button class="btn btn-warning" ng-click="cancel()">[% l('Cancel') %]</button>
 </div>