MDL-21198 $OUTPUT->single_button() resurrection, hopefully much easier to use than $OUTPUT->button(); fixed some regressions and code style improvements

This commit is contained in:
Petr Skoda
2010-01-03 15:46:14 +00:00
parent 3cd5305f11
commit 5c2ed7e215
62 changed files with 170 additions and 243 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ if ($reset and confirm_sesskey()) {
admin_externalpage_print_header('themeselector');
echo $OUTPUT->heading(get_string('themes'));
echo $OUTPUT->button(html_form::make_button('index.php', array('sesskey'=>sesskey(),'reset'=>1), get_string('themeresetcaches', 'admin')));
echo $OUTPUT->single_button(new moodle_url('index.php', array('sesskey'=>sesskey(),'reset'=>1)), get_string('themeresetcaches', 'admin'));
$table = new html_table();
$table->id = 'adminthemeselector';
@@ -95,7 +95,7 @@ foreach ($themes as $themename => $themedir) {
// Contents of the second cell.
$infocell = $OUTPUT->heading($themename, 3);
if ($themename != $CFG->theme) {
$infocell .= $OUTPUT->button(html_form::make_button('index.php', array('choose' => $themename, 'sesskey' => sesskey()), get_string('choose'), 'get'));
$infocell .= $OUTPUT->single_button(new moodle_url('index.php', array('choose' => $themename, 'sesskey' => sesskey())), get_string('choose'), 'get');
}
$row[] = $infocell;