fix defaults for module_options
This commit is contained in:
@@ -18,13 +18,8 @@ get '/report/*' => require_login sub {
|
|||||||
$class_list = [ schema('netdisco')->resultset('DeviceModule')
|
$class_list = [ schema('netdisco')->resultset('DeviceModule')
|
||||||
->get_distinct_col('class') ];
|
->get_distinct_col('class') ];
|
||||||
|
|
||||||
# this is a bit fragile... three params currently
|
foreach my $col ( @{ var('module_options') } ) {
|
||||||
my %params = request->params();
|
params->{$col->{name}} = 'checked' if $col->{default} eq 'on';
|
||||||
if (3 == scalar keys %params) {
|
|
||||||
foreach my $col ( @{ var('module_options') } ) {
|
|
||||||
next unless $col->{default} eq 'on';
|
|
||||||
$params{ $col->{name} } = 'checked';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ( $tag eq 'portssid' ) {
|
elsif ( $tag eq 'portssid' ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user