\n";
$result .= " | $name | ".
"" . &mt('Section') . " | " .
- "Status | " .
- "" . &mt("Role") . " |
" .
- "Username:Domain | ";
+ "".&mt('Status')." | " .
+ "" . &mt("Role") . " | " .
+ "".&mt('Username').":".&mt('Domain')." | ";
my $checked = 0;
for my $choice (@$choices) {
@@ -2188,37 +2436,88 @@ BUTTONS
$self->{'variable'} . '.forminput' . "'";
if (!$self->{'multichoice'} && !$checked) {
- $result .= " checked ";
+ $result .= " checked='checked' ";
$checked = 1;
}
$result .=
- " value='" . HTML::Entities::encode($choice->[0] . ':' . $choice->[2] . ':' . $choice->[1] . ':' . $choice->[3])
+ " value='" . HTML::Entities::encode($choice->[0] . ':'
+ .$choice->[2] . ':'
+ .$choice->[1] . ':'
+ .$choice->[3], "<>&\"'")
. "' />"
- . HTML::Entities::encode($choice->[1])
+ . HTML::Entities::encode($choice->[1],'<>&"')
. " | "
- . HTML::Entities::encode($choice->[2])
+ . HTML::Entities::encode($choice->[2],'<>&"')
. " | \n"
- . HTML::Entities::encode($choice->[3])
+ . HTML::Entities::encode($choice->[3],'<>&"')
. " | \n"
- . HTML::Entities::encode($choice->[4])
+ . HTML::Entities::encode($choice->[4],'<>&"')
. " | \n"
- . HTML::Entities::encode($choice->[0])
+ . HTML::Entities::encode($choice->[0],'<>&"')
. " | \n";
}
$result .= "
\n\n";
- $result .= $buttons;
-
+ $result .= $buttons;
+ #
+ # now add the fancy section choice... first enumerate the sections:
+ if ($self->{'multichoice'}) {
+ my %sections;
+ for my $key (@keys) {
+ my $section_name = $classlist->{$key}->[$section];
+ if ($section_name ne "") {
+ $sections{$section_name} = 1;
+ }
+ }
+ # The variable $choice_widget will have the html to make the choice
+ # selector.
+ my $size=5;
+ if (scalar(keys(%sections)) < 5) {
+ $size=scalar(keys(%sections));
+ }
+ my $choice_widget = '