sub init_include_cvars {
my ($self) = @_;
- return $::form->{include_cvars} if $::form->{include_cvars} && (ref($::form->{include_cvars}) eq 'HASH');
+ return { map { ($_->name => $::form->{"include_cvars_" . $_->name}) } @{ $self->cvar_configs } } if $::form->{_include_cvars_from_form};
return { map { ($_->name => ($_->includeable && $_->included_by_default)) } @{ $self->cvar_configs } };
}
%column_defs = (%column_defs, %cvar_column_defs);
}
+ my @cvar_column_form_names = ('_include_cvars_from_form', map { "include_cvars_" . $_->name } @{ $self->includeable_cvar_configs });
+
$report->set_options(
std_column_visibility => 1,
controller_class => 'RequirementSpec',
);
$report->set_columns(%column_defs);
$report->set_column_order(@columns);
- $report->set_export_options(qw(list filter));
+ $report->set_export_options(qw(list filter), @cvar_column_form_names);
$report->set_options_from_form;
$self->models->set_report_generator_sort_options(report => $report, sortable_columns => \@sortable);
}
<form method="post" action="controller.pl" id="search_form">
[%- L.hidden_tag("is_template", is_template) %]
+ [%- L.hidden_tag("_include_cvars_from_form", 1) %]
<p>
<table>
[% END %]
[% END %]
- [% L.hidden_tag("include_cvars.dummy__", 1) %]
[% IF SELF.includeable_cvar_configs.size %]
<tr>
<th align="right">[% LxERP.t8("Include in Report") %]</th>
[% FOREACH cvar_cfg = SELF.includeable_cvar_configs %]
<td>
[% name__ = cvar_cfg.name;
- L.checkbox_tag("include_cvars." _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
+ L.checkbox_tag("include_cvars_" _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
</td>
[%- IF !loop.last && ((loop.count % 3) == 0) %]
</tr><tr>