RT#38363: use cust_payby when saving cards during payments [minor fixes]
[freeside.git] / httemplate / elements / cust_payby.html
index 5e0f09d..c7d4549 100644 (file)
   </TABLE>
 
 % }
-% unless ( $opt{'html_only'} ) {
+% unless ( $opt{'html_only'} || $payby_changed_init ) {
   <SCRIPT TYPE="text/javascript">
 
     function payby_changed(what) {
     }
 
   </SCRIPT>
+%   $payby_changed_init = 1;
 % }
+<%once>
+my $payby_changed_init = 0;
+</%once>
 <%init>
 
 my( %opt ) = @_;