[freeside-commits] freeside/httemplate/edit nas.html, 1.1.2.2, 1.1.2.3 part_export.cgi, 1.32, 1.32.2.1
Mark Wells
mark at wavetail.420.am
Mon Oct 31 12:20:30 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv27281/httemplate/edit
Modified Files:
Tag: FREESIDE_2_3_BRANCH
nas.html part_export.cgi
Log Message:
export NAS table to sqlradius, #14697
Index: part_export.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_export.cgi,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -w -d -r1.32 -r1.32.2.1
--- part_export.cgi 7 Nov 2010 07:07:06 -0000 1.32
+++ part_export.cgi 31 Oct 2011 19:20:28 -0000 1.32.2.1
@@ -139,6 +139,26 @@
$html .= '</TD></TR>';
}
}
+
+ if ( $exports->{$layer}{nas} and qsearch('nas',{}) ) {
+ # show NAS checkboxes
+ $html .= '<TR><TD ALIGN="right">Export RADIUS clients</TD><TD>';
+
+ $html .= include('/elements/checkboxes-table.html',
+ 'source_obj' => $part_export,
+ 'link_table' => 'export_nas',
+ 'target_table' => 'nas',
+ #hashref => {},
+ 'name_callback' => sub {
+ $_[0]->shortname . ' (' . $_[0]->nasname . ')',
+ },
+ 'default' => 'yes',
+ 'target_link' => $p.'edit/nas.html?',
+ );
+
+ $html .= '</TD></TR>';
+ }
+
$html .= '</TABLE>';
$html .= '<INPUT TYPE="hidden" NAME="options" VALUE="'.
Index: nas.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/nas.html,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -w -d -r1.1.2.2 -r1.1.2.3
--- nas.html 14 Oct 2011 08:56:11 -0000 1.1.2.2
+++ nas.html 31 Oct 2011 19:20:28 -0000 1.1.2.3
@@ -8,7 +8,7 @@
'secret' => 'Shared secret',
'type' => 'Type',
'ports' => 'Ports',
- 'server' => 'Server',
+ 'server' => 'Virtual server',
'community' => 'Community',
'description' => 'Description',
},
@@ -25,8 +25,7 @@
{ field=>'community', size=>40, maxlength=>50 },
{ field=>'description', size=>100, maxlength=>200 },
],
- 'html_bottom' => '<font color="#ff0000">*</font> '.
- emt('required fields'). '<BR>',
+ 'html_bottom' => \&html_bottom,
'new_hashref_callback' => sub { +{ 'type' => 'other',
'secret' => 'secret',
'description' => 'RADIUS Client',
@@ -38,4 +37,24 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+sub html_bottom {
+ my $nas = shift;
+ '<font color="#ff0000">*</font> '.
+ emt('required fields'). '<BR><BR>'.
+ '<FONT SIZE="+1"><B>'.emt('Export to these RADIUS servers:').
+ '</B></FONT><BR>'.
+
+ include('/elements/checkboxes-table.html',
+ 'source_obj' => $nas,
+ 'link_table' => 'export_nas',
+ 'target_table' => 'part_export',
+ 'hashref' => { 'exporttype' => 'sqlradius' },
+ 'name_callback' => sub { $_[0]->label },
+ 'default' => 'yes',
+ 'target_link' => $p.'edit/part_export.cgi?',
+ 'disable-able' => 1,
+ )
+}
+
+
</%init>
More information about the freeside-commits
mailing list