summaryrefslogtreecommitdiff
path: root/httemplate/browse/radius_group.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse/radius_group.html')
-rw-r--r--httemplate/browse/radius_group.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/httemplate/browse/radius_group.html b/httemplate/browse/radius_group.html
new file mode 100644
index 000000000..fbf6d3766
--- /dev/null
+++ b/httemplate/browse/radius_group.html
@@ -0,0 +1,40 @@
+<& elements/browse.html,
+ 'title' => 'RADIUS Groups',
+ 'name' => 'RADIUS Groups',
+ 'menubar' => [ 'Add a RADIUS Group' => $p.'edit/radius_group.html', ],
+ 'query' => { 'table' => 'radius_group' },
+ 'count_query' => 'SELECT COUNT(*) FROM radius_group',
+ 'header' => [ '#', 'RADIUS Group', 'Description', 'Priority',
+ 'Check', 'Reply' ],
+ 'fields' => [ 'groupnum',
+ 'groupname',
+ 'description',
+ 'priority',
+ $check_attr, $reply_attr
+ ],
+ 'align' => 'lllcll',
+ 'links' => [ $link, $link, '', '', '', '',
+ ],
+&>
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied"
+ unless $curuser->access_right('Configuration');
+
+my $attr_sub = sub {
+ my $type = shift;
+ my $radius_group = shift;
+ [ map { [ { data => join(' ', $_->attrname, $_->op, $_->value) } ] }
+ grep {$_->attrtype eq $type}
+ $radius_group->radius_attr
+ ];
+};
+
+my $check_attr = sub { &$attr_sub('C', @_) };
+my $reply_attr = sub { &$attr_sub('R', @_) };
+
+my $link = [ $p.'edit/radius_group.html?', 'groupnum' ];
+
+</%init>