summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-payby.html
blob: 354eb55805ad381220b72a8c7ea968fb065caadb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<% include ('tr-td-label.html', 'label' => 'Payment type', @_ ) %>

  <TD <% $style %>>

    <% include( '/elements/select-payby.html', 
                  'curr_value'  => $curr_value,
                  %opt
              )
    %>

  </TD>

</TR>

<%init>

my %opt = @_;

#my $onchange = $opt{'onchange'}
#                 ? 'onChange="'. $opt{'onchange'}. '(this)"'
#                 : '';

my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';

my $method = 'payby2longname';
$method = 'cust_payby2longname'  if $opt{'payby_type'} eq 'cust';
#$method = 'event_payby2longname' if $opt{'payby_type'} eq 'event';
#$method = 'pay_payby2longname'   if $opt{'payby_type'} eq 'pay';

unless ( $opt{'paybys'} ) {
  tie %{ $opt{'paybys'} }, 'Tie::IxHash', FS::payby->$method();
}

my $curr_value = $opt{'curr_value'} || $opt{'value'};

</%init>