summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-radius_group.html
blob: e1e3c5980160759c559ca2cc8e7e1a0a5d4f85e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<SELECT MULTIPLE NAME = "<% $opt{'element_name'} || $opt{'field'} || 'usergroup' %>"
        <% $opt{'element_etc'} %>
>
% foreach my $selopt ( keys %groups ) {
%  my $selected = (grep{ $_ eq $selopt } @sel_groups) ? 'SELECTED' : '';
    <OPTION VALUE="<%$selopt%>" <% $selected %>><% $groups{$selopt} %></OPTION>
% }
</SELECT>
<%init>

my %opt = @_;

my %groups = map { $_->groupnum => $_->long_description }
                                                    qsearch('radius_group', {});
my @sel_groups = split(/,/,$opt{'curr_value'});

</%init>