LP#1743262: (follow-up) disable submit button if approval code not supplied
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 6 Feb 2018 20:58:57 +0000 (15:58 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 6 Feb 2018 21:02:12 +0000 (16:02 -0500)
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

index e25bd86..1551f56 100644 (file)
   </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>