X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=330081533805d4ced66c84b71826466c48fd370c;hb=c80c0c11bce165716c08e04eea3a587fc7a58210;hp=2dcbe51699dbd9d2077109574fb178135ce58ff5;hpb=fba0d3390b1d53199777735ea0366b450aa2576b;p=freeside.git
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 2dcbe5169..330081533 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -1,42 +1,50 @@
-<% include("/elements/header-popup.html", 'One-time charge entry', '',
- ( $cgi->param('error') ? '' : 'onload="addRow()"' ),
- )
-%>
+% if ( $quotationnum ) {
+<& /elements/header.html, mt('One-time charge'), '',
+ ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ),
+&>
+% } else {
+<& /elements/header-cust_main.html, view=>'packages', cust_main=>$cust_main &>
+
One-time charge
+% }
-<% include('/elements/error.html') %>
+<& /elements/init_calendar.html &>
+
+
+<& /elements/error.html &>
-
@@ -123,10 +389,26 @@ function validate_quick_charge () {
var rownum = <% $row %>;
- function possiblyAddRow() {
+ function possiblyAddRow(e) {
+
if ( ( rownum - this.getAttribute('rownum') ) == 1 ) {
addRow();
}
+
+% if ( $curuser->option('disable_enter_submit_onetimecharge') ) {
+
+ var key;
+ if (window.event)
+ key = window.event.keyCode; //IE
+ else
+ key = e.which; //firefox, others
+
+ return (key != 13);
+
+% } else {
+ return true;
+% }
+
}
function addRow() {
@@ -141,14 +423,16 @@ function validate_quick_charge () {
var description_cell = document.createElement('TD');
- var description_input = document.createElement('INPUT');
- description_input.setAttribute('name', 'description'+rownum);
- description_input.setAttribute('id', 'description'+rownum);
- description_input.setAttribute('size', 60);
- description_input.setAttribute('maxLength', 65);
- description_input.setAttribute('rownum', rownum);
- description_input.onkeyup = possiblyAddRow;
- description_cell.appendChild(description_input);
+ //var description_input = document.createElement('INPUT');
+ var di = document.createElement('INPUT');
+ di.setAttribute('name', 'description'+rownum);
+ di.setAttribute('id', 'description'+rownum);
+ di.setAttribute('size', 60);
+ di.setAttribute('maxLength', 65);
+ di.setAttribute('rownum', rownum);
+ di.onkeyup = possiblyAddRow;
+ di.onkeypress = enable_quick_charge;
+ description_cell.appendChild(di);
row.appendChild(description_cell);
@@ -164,19 +448,114 @@ function validate_quick_charge () {