This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / httemplate / elements / tr-select-payby.html
1 <% include ('tr-td-label.html', 'label' => 'Payment type', @_ ) %>
2
3   <TD <% $style %>>
4
5     <% include( '/elements/select-payby.html', 
6                   'curr_value'  => $curr_value,
7                   %opt
8               )
9     %>
10
11   </TD>
12
13 </TR>
14
15 <%init>
16
17 my %opt = @_;
18
19 #my $onchange = $opt{'onchange'}
20 #                 ? 'onChange="'. $opt{'onchange'}. '(this)"'
21 #                 : '';
22
23 my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
24
25 my $method = 'payby2longname';
26 $method = 'cust_payby2longname'  if $opt{'payby_type'} eq 'cust';
27 #$method = 'event_payby2longname' if $opt{'payby_type'} eq 'event';
28 #$method = 'pay_payby2longname'   if $opt{'payby_type'} eq 'pay';
29
30 unless ( $opt{'paybys'} ) {
31   tie %{ $opt{'paybys'} }, 'Tie::IxHash', FS::payby->$method();
32 }
33
34 my $curr_value = $opt{'curr_value'} || $opt{'value'};
35
36 </%init>
37