2 <TR STYLE="display:block">
3 <TH ALIGN="right"><% mt('Payment options') |h %></TH>
6 ID = "<% $opt{prefix} %>payment_option"
7 NAME = "<% $opt{prefix} %>payment_option"
8 onChange = "<% $opt{prefix} %>payment_option_changed(this)"
11 <OPTION VALUE="select">Select payment option</OPTION>
12 <OPTION VALUE="<% $opt{amount} %>">Pay full balance</OPTION>
13 <OPTION VALUE="invoice">Pay specific invoice</OPTION>
14 <OPTION VALUE="">Pay specific amount</OPTION>
19 <& /elements/tr-select-invoice.html,
23 <& /elements/tr-amount_fee.html,
27 <SCRIPT TYPE="text/javascript">
29 function <% $opt{prefix} %>payment_option_changed(what) {
31 if ( what.value == 'select' ) {
32 document.getElementById('payment_amount_row').style.display = 'none';
33 document.getElementById('invoice_row').style.display = 'none';
34 document.getElementById('amount').value = '';
36 else if ( what.value == 'invoice' ) {
37 document.getElementById('payment_amount_row').style.display = 'none';
38 document.getElementById('invoice_row').style.display = 'block';
39 document.getElementById('amount').value = '';
42 document.getElementById('payment_amount_row').style.display = 'block';
43 document.getElementById('invoice_row').style.display = 'none';
44 document.getElementById('amount').value = what.value;
49 function <% $opt{prefix} %>invoice_select_changed(what) {
51 if ( what.value == 'select' ) {
52 document.getElementById('payment_amount_row').style.display = 'none';
53 document.getElementById('amount').value = '';
56 document.getElementById('payment_amount_row').style.display = 'block';
57 document.getElementById('amount').value = what.value;