internationalization/localization, RT12515
[freeside.git] / httemplate / view / cust_main / one_time_charge_link.html
index f6bb434..cf22c42 100644 (file)
@@ -1,9 +1,11 @@
 <SCRIPT TYPE="text/javascript">
 
 function taxproductmagic(which) {
+
   var str = '';
   var elements = which.form.elements;
   for (var i = 0; i<elements.length; i++) {
+
     if (elements[i].name == 'taxproductnum'){
       document.getElementById('taxproductnum').value = elements[i].value;
       continue;
@@ -11,8 +13,21 @@ function taxproductmagic(which) {
     if (elements[i].name == 'taxproductnum_description'){
       continue;
     }
+
     if (str.length){str += ';';}
-    str += elements[i].name + '=' + escape(elements[i].value);
+
+    var value = '';
+    if ( elements[i].type == 'checkbox' || elements[i].type == 'radio' ) {
+      if ( elements[i].checked == true ) {
+        value = elements[i].value;
+      //} else {
+      //  value = '';
+      }
+    } else {
+      value = elements[i].value;
+    }
+    str += elements[i].name + '=' + escape(value);
+
   }
   document.getElementById('charge_storage').value = str;
   cClick();
@@ -25,7 +40,7 @@ function taxproductquickchargemagic() {
   str += 'magic=taxproductnum;taxproductnum=';
   str += escape(document.getElementById('taxproductnum').value);
   cClick();
-  overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, 'Close');
+  overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, <% mt('Close') %>);
 
 }
 
@@ -51,7 +66,7 @@ function taxoverridequickchargemagic() {
   str += 'magic=taxoverride;tax_override=';
   str += document.getElementById('tax_override').value;
   cClick();
-  overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, 'Close');
+  overlib( OLiframeContent('<% $p %>/edit/quick-charge.html?'+str, 545, 336, 'One-time charge'), CAPTION, 'One-time charge', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '#333399', CGCOLOR, '#333399', CLOSETEXT, <% mt('Close') %>);
 
 }
 
@@ -61,11 +76,11 @@ function taxoverridequickchargemagic() {
 
 <% include('/elements/popup_link.html', { 
      'action'      => $p.'edit/quick-charge.html?custnum='. $cust_main->custnum,
-     'label'       => 'One-time charge',
-     'actionlabel' => 'One-time charge',
+     'label'       => emt('One-time charge'),
+     'actionlabel' => emt('One-time charge'),
      'color'       => '#333399',
      'width'       => 763,
-     'height'      => 408,
+     'height'      => 460, #more for more room for lines of add'l description?
    })
 %>