projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add quantity validation for one-time charge. See RT#37675.
[freeside.git]
/
httemplate
/
edit
/
quick-charge.html
diff --git
a/httemplate/edit/quick-charge.html
b/httemplate/edit/quick-charge.html
index
896e8b2
..
2d38203
100644
(file)
--- a/
httemplate/edit/quick-charge.html
+++ b/
httemplate/edit/quick-charge.html
@@
-1,12
+1,15
@@
-% if ( $quotationnum ) {
-<& /elements/header.html, mt('
One-time charge'
) &>
+% if ( $quotationnum
&& ! $cust_main
) {
+<& /elements/header.html, mt('
Quotation #[_1]: add one-time charge', $quotationnum
) &>
% } else {
<& /elements/header-cust_main.html,
% } else {
<& /elements/header-cust_main.html,
- view => 'packages',
+ view =>
$quotationnum ? 'quotations' :
'packages',
cust_main => $cust_main,
etc => $cgi->param('error') ? '' : 'onload="addRow()"',
&>
cust_main => $cust_main,
etc => $cgi->param('error') ? '' : 'onload="addRow()"',
&>
-<h2>One-time charge</h2>
+<h2><% $quotationnum
+ ? emt('Quotation #[_1]: add one-time charge', $quotationnum)
+ : mt('One-time charge')
+ %></h2>
% }
<& /elements/init_calendar.html &>
% }
<& /elements/init_calendar.html &>
@@
-446,10
+449,19
@@
function bill_now_changed (what) {
</SCRIPT>
</SCRIPT>
+%my %footer_args = (
+% formvalidation => {
+% QuickChargeForm => {
+% validate_fields => {
+% quantity => 'digits: true, min: 1, required: true',
+% },
+% },
+% },
+%);
% if ( $quotationnum ) {
% if ( $quotationnum ) {
- <& /elements/footer.html &>
+ <& /elements/footer.html
, %footer_args
&>
% } else {
% } else {
- <& /elements/footer-cust_main.html &>
+ <& /elements/footer-cust_main.html
, %footer_args
&>
% }
<%init>
% }
<%init>