From ea75c42317d8f327d9dbbbf2f6127dc987f60b66 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Dec 2007 07:51:37 +0000 Subject: [PATCH] alas, XSSmas draws to a close --- httemplate/edit/quick-charge.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 5d4bc2e1c..92e0ae753 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -2,10 +2,8 @@ ( $cgi->param('error') ? '' : 'onload="addRow()"' ), ) %> -% if ( $cgi->param('error') ) { - <% $cgi->param('error') %>

-% } +<% include('/elements/error.html') %> - -
- + + <% include('/elements/tr-select-taxclass.html') %> @@ -106,7 +103,7 @@ function validate_quick_charge () { % } @@ -164,3 +161,18 @@ function validate_quick_charge () { +<%init> + +$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; +my $custnum = $1; + +my $amount = ''; +if ( $cgi->param('amount') =~ /^\s*\$?\s*(\d+(\.\d{1,2})?)\s*$/ ) { + $amount = $1; +} + +$cgi->param('pkg') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ + or die 'illegal description'; +my $pkg = $1; + + -- 2.11.0
Amount: - $ + $
Description: - +
- " rownum="<% $row %>" onkeyup = "possiblyAddRow;" > + " rownum="<% $row %>" onkeyup = "possiblyAddRow;" >