From 62157b20f819936d8287f12689c3b5cb34efe7ae Mon Sep 17 00:00:00 2001 From: Justin DeVuyst Date: Fri, 3 Mar 2017 19:20:40 -0500 Subject: [PATCH] Add quantity validation for one-time charge. See RT#37675. --- httemplate/edit/quick-charge.html | 13 +++++++++++-- httemplate/elements/footer-cust_main.html | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index af6fd417d..2d38203fa 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -449,10 +449,19 @@ function bill_now_changed (what) { +%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> diff --git a/httemplate/elements/footer-cust_main.html b/httemplate/elements/footer-cust_main.html index c9a9cc215..9349c1d04 100644 --- a/httemplate/elements/footer-cust_main.html +++ b/httemplate/elements/footer-cust_main.html @@ -1,2 +1,2 @@ -<& /elements/footer.html &> +<& /elements/footer.html, %ARGS &> -- 2.11.0