blob: 9ac473ce785986239664a54f6cccd679b1e96c3f (
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
|
% if ( scalar(@{ $opt{'reason_type'} }) == 0 ) {
<INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'typenum' %>" VALUE="">
% } else {
<& /elements/tr-td-label.html, label => $opt{'label'} || 'Reason type', %opt &>
<TD COLSPAN="<% $colspan %>">
<% include( '/elements/select-reason_type.html',
'curr_value' => $typenum,
%opt
)
%>
</TD>
</TR>
% }
<%init>
my %opt = @_;
my $typenum = $opt{'curr_value'} || $opt{'value'};
$opt{'reason_type'} ||= [ qsearch( 'reason_type', { disabled=>'' } ) ];
my $colspan = delete($opt{'colspan'}) || 1;
</%init>
|