From 6105bf23093781fcad169f7acd03736a11a4ab9d Mon Sep 17 00:00:00 2001
From: Galen Charlton <gmc@equinoxinitiative.org>
Date: Tue, 6 Feb 2018 15:58:57 -0500
Subject: [PATCH] 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>
---
 Open-ILS/src/templates/staff/circ/patron/t_cc_payment_dialog.tt2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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>
 
-- 
2.11.0