X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=af6fd417d2fc5c28bace7eb02430f572375b5a7f;hb=29838688b9e4d774d32caeb2cfc8231b1ada891d;hp=1ff70009c12f79f95b98be86d74d6fb22036566b;hpb=55daa3803103f841d0fb2b559040115908724da8;p=freeside.git
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 1ff70009c..af6fd417d 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -1,11 +1,19 @@
-<& /elements/header-popup.html, mt('One-time charge'), '',
- ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ),
+% if ( $quotationnum && ! $cust_main ) {
+<& /elements/header.html, mt('Quotation #[_1]: add one-time charge', $quotationnum) &>
+% } else {
+<& /elements/header-cust_main.html,
+ view => $quotationnum ? 'quotations' : 'packages',
+ cust_main => $cust_main,
+ etc => $cgi->param('error') ? '' : 'onload="addRow()"',
&>
+
<% $quotationnum
+ ? emt('Quotation #[_1]: add one-time charge', $quotationnum)
+ : mt('One-time charge')
+ %>
+% }
-
-
-
-
+<& /elements/init_calendar.html &>
+
<& /elements/error.html &>
@@ -15,9 +23,9 @@ function enable_quick_charge (e) {
if ( document.QuickChargeForm.amount.value
&& document.QuickChargeForm.pkg.value ) {
- document.QuickChargeForm.submitButton.disabled = false;
+ document.QuickChargeForm.submit.disabled = false;
} else {
- document.QuickChargeForm.submitButton.disabled = true;
+ document.QuickChargeForm.submit.disabled = true;
}
% if ( $curuser->option('disable_enter_submit_onetimecharge') ) {
@@ -39,7 +47,7 @@ function enable_quick_charge (e) {
function validate_quick_charge () {
var pkg = document.QuickChargeForm.pkg.value;
- var pkg_regex = /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ ;
+ var pkg_regex = XRegExp('^([\\p{L}\\p{N} \_\!\@\#\$\%\&\(\)\+\;\:\'\"\,\.\?\/\=\\-\\[\\]]*)$');
var amount = document.QuickChargeForm.amount.value;
var amount_regex = /^\s*\$?\s*(\d*(\.?\d{1,2}))\s*$/ ;
var rval = true;
@@ -93,18 +101,24 @@ function bill_now_changed (what) {
+
+% if ( $prospect_main ) {
+<& /elements/small_prospect_view.html, $prospect_main &>
+% }
+
+