64d722e529d365f15de87e0968e033af5ea6e0d3
[freeside.git] / httemplate / edit / nas.html
1 <& elements/edit.html,  
2     'name_singular' => 'RADIUS client',
3     'table'         => 'nas',
4     'viewall_dir'   => 'browse',
5     'labels'        => { 'nasnum'      => 'NAS',
6                          'nasname'     => 'Hostname',
7                          'shortname'   => 'Short name',
8                          'secret'      => 'Shared secret',
9                          'type'        => 'Type',
10                          'ports'       => 'Ports',
11                          'server'      => 'Server',
12                          'community'   => 'Community',
13                          'description' => 'Description',
14                        },
15     'fields'        => [
16       { field=> 'nasname', required=>1, size=>40, maxlength=>128 },
17       { field=>'shortname', size=>16, maxlength=>32 },
18       { field=>'secret', size=>40, maxlength=>60, required=>1 },
19       { field=>'type', type=>'select',
20         options=>[qw( cisco computone livingston max40xx multitech netserver
21                       pathras patton portslave tc usrhiper other )],
22       },
23       { field=>'ports', size=>5 },
24       { field=>'server', size=>40, maxlength=>64 },
25       { field=>'community', size=>40, maxlength=>50 },
26       { field=>'description', size=>100, maxlength=>200 },
27     ],
28     'html_bottom'   => '<font color="#ff0000">*</font>&nbsp;'.
29                        emt('required fields'). '<BR>',
30     'new_hashref_callback' => sub { +{ 'type'        => 'other',
31                                        'secret'      => 'secret',
32                                        'description' => 'RADIUS Client',
33                                      };
34                                   },
35 &>
36 <%init>
37
38 die "access denied"
39   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
40
41 </%init>