+++ /dev/null
- <TR>
- <TD ALIGN="right"><% $opt{'label'} || 'Show Voided Credits' %></TD>
- <TD>
- <select name='show_voided_credits'>
- <option value=""></option>
- <option value="0">no</option>
- <option value="1">yes</option>
- </select>
- </TD>
- </TR>
-<%init>
-
-my %opt = @_;
-
-</%init>
: '';
};
-# form selectbox for show_voided_credits:
-# - value='': use default from $conf
-# - value="0" : override default, do not show voided credits
-# - value="1" : override default, show voided credits
+# form checkbox for show_voided_credits:
+# - value=unset : do not show voided credits
+# - value="1" : show voided credits
my $show_voided_credits;
-$show_voided_credits = $conf->config('show_voided_credits');
$show_voided_credits = $cgi->param('show_voided_credits')
- if $cgi->param('show_voided_credits') =~ /^(\d)$/;
+ if $cgi->param('show_voided_credits');
my (@header, @fields, @sort_fields, $align, @links, @color, @style);
$align = '';
'field' => 'amount',
&>
- <& /elements/tr-select-show_voided_credits.html,
- 'label' => emt('Show Voided Credits'),
+ <& /elements/tr-checkbox.html,
+ 'label' => emt('Show Voided Credits').':',
+ 'field' => 'show_voided_credits',
+ 'value' => '1',
&>
'Unapplied credit report' : 'Credit report';
</%init>
-