Skip to content
Permalink
Browse files

Some cleaning up of configuration interfaces

  • Loading branch information...
moodler
moodler committed Feb 9, 2005
1 parent f0fd343 commit 9ca16fd456f4c1f4ff368d1a78aeac9714af2168
Showing with 65 additions and 12 deletions.
  1. +1 −1 admin/auth.php
  2. +1 −1 admin/block.php
  3. +57 −4 admin/config.php
  4. +1 −1 admin/configure.php
  5. +1 −1 admin/enrol.php
  6. +2 −2 admin/filters.php
  7. +1 −1 admin/index.php
  8. +1 −1 admin/module.php
@@ -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();
@@ -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">';
@@ -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 ( '&nbsp;',
'<span class="configwarning">'.$configobject->warning.'</span>'
);
}
$table->data[] = array ( '&nbsp;',
'<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);
@@ -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'));
@@ -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();
@@ -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> -> ".
@@ -295,7 +295,7 @@
$table->cellspacing = 3;
$table->width = "40%";
$configdata = "<font size=+1>&nbsp;</font><a href=\"config.php\">".get_string("configvariables")."</a> - <font size=\"1\">".
$configdata = "<font size=+1>&nbsp;</font><a href=\"config.php\">".get_string("configvariables", 'admin')."</a> - <font size=\"1\">".
get_string("adminhelpconfigvariables")."</font><br />";
$configdata .= "<font size=+1>&nbsp;</font><a href=\"site.php\">".get_string("sitesettings")."</a> - <font size=\"1\">".
get_string("adminhelpsitesettings")."</font><br />";
@@ -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", "");

0 comments on commit 9ca16fd

Please sign in to comment.
You can’t perform that action at this time.