Revert "RT#41671 Fix double click prevention for all legacy buttons [renamed all...
[freeside.git] / httemplate / edit / quick-charge.html
index 78752c0..1ff7000 100644 (file)
@@ -1,5 +1,5 @@
 <& /elements/header-popup.html, mt('One-time charge'), '',
-            ( $cgi->param('error') ? '' : 'onload="addRow()"' ),
+            ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ),
 &>
 
 <LINK REL="stylesheet" TYPE="text/css" HREF="<%$fsurl%>elements/calendar-win2k-2.css" TITLE="win2k-2">
@@ -15,9 +15,9 @@ function enable_quick_charge (e) {
 
   if (    document.QuickChargeForm.amount.value
        && document.QuickChargeForm.pkg.value    ) {
-    document.QuickChargeForm.submit.disabled = false;
+    document.QuickChargeForm.submitButton.disabled = false;
   } else {
-    document.QuickChargeForm.submit.disabled = true;
+    document.QuickChargeForm.submitButton.disabled = true;
   }
 
 % if ( $curuser->option('disable_enter_submit_onetimecharge') ) {
@@ -97,7 +97,7 @@ function bill_now_changed (what) {
       NAME     = "QuickChargeForm"
       ID       = "QuickChargeForm"
       METHOD   = "POST"
-      onSubmit = "document.QuickChargeForm.submit.disabled=true; return validate_quick_charge();"
+      onSubmit = "document.QuickChargeForm.submitButton.disabled=true; return validate_quick_charge();"
 >
 
 <INPUT TYPE="hidden" NAME="custnum"     VALUE="<% $cust_main ? $cust_main->custnum : '' %>">
@@ -327,13 +327,16 @@ function bill_now_changed (what) {
   </TD>
 </TR>
 
+% my $row = 0;
+% # quotation details are handled by quotation_pkg_detail records, added via link from view/quotation.html
+% # the details below get attached to the part_pkg record, and there's no way to edit that from quotations
+% unless ($quotationnum) {
 <TR>
   <TD></TD>
   <TD><FONT SIZE="-1"><% mt('Optional additional description (also printed on invoice):') |h %> </FONT></TD>
 </TR>
 
-% my $row = 0;
-% foreach (@description) {
+%   foreach (@description) {
     <TR>
       <TD></TD>
       <TD>
@@ -348,8 +351,9 @@ function bill_now_changed (what) {
         >
       </TD>
     </TR>
-% $row++;
-% } 
+%     $row++;
+%   }
+% }
 
 
 </TABLE>
@@ -358,7 +362,7 @@ function bill_now_changed (what) {
 % my $label = $cust_pkg
 %             ? emt('Modify one-time charge')
 %             : emt('Add one-time charge');
-<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="<% $label %>" \
+<INPUT TYPE="submit" ID="submit" NAME="submitButton" VALUE="<% $label %>" \
 <% ($cgi->param('error') || $cust_pkg) ? '' :' DISABLED' %>>
 
 </FORM>