From d8c39492e9192d9c66858d21c6c69b069968eec7 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 8 Dec 2006 13:36:07 +0000 Subject: [PATCH] some javascript validation magic to give one-time charges better UI --- httemplate/edit/process/quick-charge.cgi | 2 +- httemplate/view/cust_main/quick-charge.html | 68 ++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 70778c1cc..cb2654bb5 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -5,7 +5,7 @@ % or die 'illegal custnum '. $cgi->param('custnum'); %my $custnum = $1; % -%$cgi->param('amount') =~ /^\s*(\d+(\.\d{1,2})?)\s*$/ +%$cgi->param('amount') =~ /^\s*\$?\s*(\d+(\.\d{1,2})?)\s*$/ % or die 'illegal amount '. $cgi->param('amount'); %my $amount = $1; % diff --git a/httemplate/view/cust_main/quick-charge.html b/httemplate/view/cust_main/quick-charge.html index be8b9d838..06ffd75e6 100644 --- a/httemplate/view/cust_main/quick-charge.html +++ b/httemplate/view/cust_main/quick-charge.html @@ -1,19 +1,73 @@ -% -% my( $cust_main ) = @_; -% + + +
-Description: +Description: -Amount: +Amount: <% include('/elements/select-taxclass.html') %> - +
+<%init> + +my( $cust_main ) = @_; + + -- 2.11.0