Some cleaning up of configuration interfaces
This commit is contained in:
+1
-1
@@ -107,7 +107,7 @@
|
||||
print_simple_box_start("center", "100%");
|
||||
print_heading($options[$auth]);
|
||||
|
||||
print_simple_box_start("center", "60%");
|
||||
print_simple_box_start("center", "60%", '', 5, 'informationbox');
|
||||
print_string("auth_$auth"."description", "auth");
|
||||
print_simple_box_end();
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
|
||||
print_heading($strblockname);
|
||||
|
||||
print_simple_box('<center>'.get_string('configwarning').'</center>', 'center', '50%');
|
||||
print_simple_box('<center>'.get_string('configwarning', 'admin').'</center>', 'center', '50%');
|
||||
echo '<br />';
|
||||
|
||||
echo '<form method="post" action="block.php">';
|
||||
|
||||
+57
-4
@@ -71,9 +71,12 @@
|
||||
$focus = '';
|
||||
}
|
||||
|
||||
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
|
||||
|
||||
|
||||
$stradmin = get_string('administration');
|
||||
$strconfiguration = get_string('configuration');
|
||||
$strconfigvariables = get_string('configvariables');
|
||||
$strconfigvariables = get_string('configvariables', 'admin');
|
||||
|
||||
if ($site) {
|
||||
print_header("$site->shortname: $strconfigvariables", $site->fullname,
|
||||
@@ -84,15 +87,65 @@
|
||||
print_header();
|
||||
print_heading($strconfigvariables);
|
||||
print_simple_box(get_string('configintro'), 'center', "50%");
|
||||
echo "<br />";
|
||||
echo '<br />';
|
||||
}
|
||||
|
||||
$sesskey = !empty($USER->id) ? $USER->sesskey : '';
|
||||
|
||||
|
||||
/// Get all the configuration fields and helptext
|
||||
include('configvars.php');
|
||||
|
||||
/// Cycle through the sections to get the sectionnames
|
||||
$linktext = '';
|
||||
foreach($configvars as $sectionname=>$section) {
|
||||
if ($linktext !== '') {
|
||||
$linktext .= ' | ';
|
||||
}
|
||||
$linktext .= '<a href="#configsection'.$sectionname.'">'.get_string('configsection'.$sectionname, 'admin').'</a>';
|
||||
}
|
||||
|
||||
echo "<center>$linktext</center>\n";
|
||||
|
||||
print_simple_box_start('center');
|
||||
include('config.html');
|
||||
|
||||
echo '<form method="post" action="config.php" name="form">';
|
||||
|
||||
/// Cycle through each section of the configuration
|
||||
foreach ($configvars as $sectionname=>$section) {
|
||||
|
||||
print_heading('<a name="configsection'.$sectionname.'"></a>'.get_string('configsection'.$sectionname, 'admin'));
|
||||
|
||||
$table = NULL;
|
||||
$table->data = array();
|
||||
foreach ($section as $configvariable=>$configobject) {
|
||||
$table->data[] = array ( $configvariable.': ',
|
||||
$configobject->field
|
||||
);
|
||||
if ($configobject->display_warning()) {
|
||||
$table->data[] = array ( ' ',
|
||||
'<span class="configwarning">'.$configobject->warning.'</span>'
|
||||
);
|
||||
}
|
||||
$table->data[] = array ( ' ',
|
||||
'<span class="confighelp">'.$configobject->help.'</span>'
|
||||
);
|
||||
$table->align = array ('right', 'left');
|
||||
}
|
||||
print_table($table);
|
||||
|
||||
}
|
||||
echo '<center>';
|
||||
echo '<input type="hidden" name="sesskey" value="'.$sesskey.'" />';
|
||||
echo '<input type="submit" value="'.get_string('savechanges').'" />';
|
||||
echo '</center>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
print_simple_box_end();
|
||||
|
||||
|
||||
|
||||
|
||||
/// Lock some options
|
||||
|
||||
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
|
||||
$table->align = array ('right', 'left');
|
||||
|
||||
$table->data[] = array("<strong><a href=\"config.php\">". get_string('configvariables') .'</a></strong>',
|
||||
$table->data[] = array("<strong><a href=\"config.php\">". get_string('configvariables', 'admin') .'</a></strong>',
|
||||
get_string('adminhelpconfigvariables'));
|
||||
$table->data[] = array("<strong><a href=\"site.php\">". get_string('sitesettings') .'</a></strong>',
|
||||
get_string('adminhelpsitesettings'));
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@
|
||||
print_simple_box_start("center", "80%");
|
||||
print_heading($options[$enrol]);
|
||||
|
||||
print_simple_box_start("center", "60%");
|
||||
print_simple_box_start("center", "60%", '', 5, 'informationbox');
|
||||
print_string("description", "enrol_$enrol");
|
||||
print_simple_box_end();
|
||||
|
||||
|
||||
+2
-2
@@ -32,9 +32,9 @@
|
||||
$stractive = get_string("active");
|
||||
$strinactive = get_string("inactive");
|
||||
$strcachetext = get_string("cachetext", "admin");
|
||||
$strconfigcachetext = get_string("configcachetext");
|
||||
$strconfigcachetext = get_string("configcachetext", 'admin');
|
||||
$strfilteruploadedfiles = get_string("filteruploadedfiles", "admin");
|
||||
$strconfigfilteruploadedfiles = get_string("configfilteruploadedfiles");
|
||||
$strconfigfilteruploadedfiles = get_string("configfilteruploadedfiles", 'admin');
|
||||
|
||||
print_header("$site->shortname: $strmanagefilters", "$site->fullname",
|
||||
"<a href=\"index.php\">$stradministration</a> -> ".
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@
|
||||
$table->cellspacing = 3;
|
||||
$table->width = "40%";
|
||||
|
||||
$configdata = "<font size=+1> </font><a href=\"config.php\">".get_string("configvariables")."</a> - <font size=\"1\">".
|
||||
$configdata = "<font size=+1> </font><a href=\"config.php\">".get_string("configvariables", 'admin')."</a> - <font size=\"1\">".
|
||||
get_string("adminhelpconfigvariables")."</font><br />";
|
||||
$configdata .= "<font size=+1> </font><a href=\"site.php\">".get_string("sitesettings")."</a> - <font size=\"1\">".
|
||||
get_string("adminhelpsitesettings")."</font><br />";
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
|
||||
print_heading($strmodulename);
|
||||
|
||||
print_simple_box("<center>".get_string("configwarning")."</center>", "center", "50%");
|
||||
print_simple_box("<center>".get_string("configwarning", 'admin')."</center>", "center", "50%");
|
||||
echo "<br />";
|
||||
|
||||
print_simple_box_start("center", "");
|
||||
|
||||
Reference in New Issue
Block a user