maintenance mode MDL-15700 Just some little tidyups of the maintenance mode page

This commit is contained in:
moodler 2009-01-20 06:01:05 +00:00
parent 80829be920
commit f3a36b620d
2 changed files with 17 additions and 4 deletions

View File

@ -33,33 +33,42 @@
admin_externalpage_print_header();
print_heading(get_string('sitemaintenancemode', 'admin'));
print_box_start();
/// Print the appropriate form
if (file_exists($filename)) { // We are in maintenance mode
echo '<div style="margin-left:auto;margin-right:auto">';
echo '<div class="buttons">';
echo '<p>'.get_string('sitemaintenanceon', 'admin').'</p>';
echo '<form action="maintenance.php" method="post">';
echo '<div>';
echo '<input type="hidden" name="action" value="disable" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<p><input type="submit" value="'.get_string('disable').'" /></p>';
echo '</div>';
echo '</form>';
echo '</div>';
} else { // We are not in maintenance mode
$usehtmleditor = can_use_html_editor();
echo '<div style="text-align:center;margin-left:auto;margin-right:auto">';
echo '<div class="buttons">';
echo '<form action="maintenance.php" method="post">';
echo '<div>';
echo '<input type="hidden" name="action" value="enable" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '<p><input type="submit" value="'.get_string('enable').'" /></p>';
echo '<p>'.get_string('optionalmaintenancemessage', 'admin').':</p>';
echo '<table><tr><td>';
echo '<div class="editor" style="width:600px;">'; // contains the editor
print_textarea($usehtmleditor, 20, 50, 600, 400, "text");
echo '</td></tr></table>';
echo '</div>';
echo '</div>';
echo '</form>';
echo '</div>';
}
print_box_end();
admin_externalpage_print_footer();
?>

View File

@ -1013,6 +1013,10 @@ body#admin-modules table.generaltable td.c0
text-align: center;
}
#admin-maintenance .buttons {
text-align:center;
}
#admin-report-unittest-index .exception pre {
padding: 8px;
}