[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 23 16:39:23 EST 2020
raeburn Wed Dec 23 21:39:23 2020 EDT
Modified files:
/loncom/interface domainprefs.pm
Log:
- Bug 6914. Add missing call to &wafproxy_titles(), and some readability
changes to web form used to configure WAF/reverse proxy settings.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.373 loncom/interface/domainprefs.pm:1.374
--- loncom/interface/domainprefs.pm:1.373 Fri Dec 18 15:23:02 2020
+++ loncom/interface/domainprefs.pm Wed Dec 23 21:39:23 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.373 2020/12/18 15:23:02 raeburn Exp $
+# $Id: domainprefs.pm,v 1.374 2020/12/23 21:39:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -263,7 +263,7 @@
my @prefs_order = ('rolecolors','login','defaults','wafproxy','passwords','quotas',
'autoenroll','autoupdate','autocreate','directorysrch',
'contacts','privacy','usercreation','selfcreation',
- 'usermodification','scantron','requestcourses','requestauthor'
+ 'usermodification','scantron','requestcourses','requestauthor',
'coursecategories','serverstatuses','helpsettings','coursedefaults',
'ltitools','proctoring','selfenrollment','usersessions','ssl',
'trust','lti');
@@ -7185,6 +7185,7 @@
my $datatable;
my %servers = &Apache::lonnet::internet_dom_servers($dom);
my (%othercontrol,%otherdoms,%aliases,%values,$setdom);
+ my %lt = &wafproxy_titles();
foreach my $server (sort(keys(%servers))) {
my $serverhome = &Apache::lonnet::get_server_homeID($servers{$server});
my $serverdom;
@@ -7217,7 +7218,7 @@
if (ref($config{$domain}) eq 'HASH') {
if (ref($config{$domain}{'wafproxy'}) eq 'HASH') {
$aliases{$domain} = $config{$domain}{'wafproxy'}{'alias'};
- foreach my $item ('exempt','trusted','ipheader') {
+ foreach my $item ('ipheader','trusted','exempt') {
$values{$domain}{$item} = $config{$domain}{'wafproxy'}{$item};
}
}
@@ -7232,7 +7233,7 @@
$datatable .= '<tr'.$css_class.'>'.
'<td>'.&mt('Hostname').': '.
&Apache::lonnet::hostname($server).'</td>'.
- '<td>';
+ '<td class="LC_right_item">';
if ($othercontrol{$server}) {
my $current;
if (ref($aliases{$othercontrol{$server}}) eq 'HASH') {
@@ -7254,7 +7255,7 @@
}
}
$datatable .= '<input type="text" name="wafproxy_alias_'.$server.'" '.
- 'value="'.$current.'" size="20" />';
+ 'value="'.$current.'" size="30" />';
}
$datatable .= '</td></tr>';
}
@@ -7263,15 +7264,22 @@
$itemcount ++;
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
$datatable .= '<tr'.$css_class.'>'.
- '<td>'.&mt('Domain: [_1]','<b>'.$dom.'</b>').'<br /><br />'.
+ '<td class="LC_left_item">'.&mt('Domain: [_1]','<b>'.$dom.'</b>').'<br /><br />'.
&mt('Format for comma separated IP blocks').':<br />'.
&mt('A.B.C.D/N or A.B.C.D - E.F.G.H').'</td>'.
'<td class="LC_left_item"><table>';
foreach my $item ('ipheader','trusted','exempt') {
$datatable .= '<tr>'.
- '<td>'.$lt{$item}.': '.
- '<input type="text" value="'.$values{$dom}{$item}.'" '.
- 'name="wafproxy_'.$item.'" /></td></tr>';
+ '<td valign="top">'.$lt{$item}.': ';
+ if ($item eq 'ipheader') {
+ $datatable .= '<input type="text" value="'.$values{$dom}{$item}.'" '.
+ 'name="wafproxy_'.$item.'" />';
+
+ } else {
+ $datatable .= '<textarea name="wafproxy_'.$item.'" rows="3" cols="80">'.
+ $values{$dom}{$item}.'</textarea>';
+ }
+ $datatable .= '</td></tr>';
}
$datatable .= '</table></td></tr>';
}
@@ -7280,8 +7288,8 @@
$itemcount ++;
$css_class = $itemcount%2 ? ' class="LC_odd_row"' : '';
$datatable .= '<tr'.$css_class.'>'.
- '<td>'.&mt('Domain: [_1]',$domain).
- '<table>';
+ '<td class="LC_left_item">'.&mt('Domain: [_1]',$domain).'</td>'.
+ '<td class="LC_left_item"><table>';
foreach my $item ('ipheader','trusted','exempt') {
my $showval = &mt('None');
if ($values{$domain}{$item}) {
More information about the LON-CAPA-cvs
mailing list