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:
+4
-4
@@ -90,15 +90,15 @@ if (empty($SITE->fullname)) {
|
||||
|
||||
} else {
|
||||
if ($PAGE->user_allowed_editing()) {
|
||||
$options = $PAGE->url->params();
|
||||
$url = clone($PAGE->url);
|
||||
if ($PAGE->user_is_editing()) {
|
||||
$caption = get_string('blockseditoff');
|
||||
$options['adminedit'] = 'off';
|
||||
$url->param('adminedit', 'off');
|
||||
} else {
|
||||
$caption = get_string('blocksediton');
|
||||
$options['adminedit'] = 'on';
|
||||
$url->param('adminedit', 'on');
|
||||
}
|
||||
$buttons = $OUTPUT->button(html_form::make_button($PAGE->url->out(), $options, $caption, 'get'));
|
||||
$buttons = $OUTPUT->single_button($url, $caption, 'get');
|
||||
}
|
||||
|
||||
$visiblepathtosection = array_reverse($settingspage->visiblepath);
|
||||
|
||||
Reference in New Issue
Block a user