Add quantity validation for one-time charge. See RT#37675.
authorJustin DeVuyst <justin@devuyst.com>
Sat, 4 Mar 2017 00:20:40 +0000 (19:20 -0500)
committerJustin DeVuyst <justin@devuyst.com>
Sat, 4 Mar 2017 00:20:40 +0000 (19:20 -0500)
httemplate/edit/quick-charge.html
httemplate/elements/footer-cust_main.html

index af6fd41..2d38203 100644 (file)
@@ -449,10 +449,19 @@ function bill_now_changed (what) {
 
 </SCRIPT>
 
+%my %footer_args = (
+%    formvalidation => {
+%        QuickChargeForm => {
+%            validate_fields => {
+%                quantity => 'digits: true, min: 1, required: true',
+%            },
+%        },
+%    },
+%);
 % if ( $quotationnum ) {
-  <& /elements/footer.html &>
+  <& /elements/footer.html, %footer_args &>
 % } else {
-  <& /elements/footer-cust_main.html &>
+  <& /elements/footer-cust_main.html, %footer_args &>
 % }
 <%init>
 
index c9a9cc2..9349c1d 100644 (file)
@@ -1,2 +1,2 @@
 </DIV>
-<& /elements/footer.html &>
+<& /elements/footer.html, %ARGS &>