mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-56576 admin: Cannot edit blocks on search page
Admin search page was processing the blocks delete request before the blocks could process it. Added a hidden field to the search results form so it can be sure the form submission was for saving admin settings.
This commit is contained in:
parent
2a7c540c48
commit
057e1a1f6d
@ -19,7 +19,7 @@ $errormsg = '';
|
||||
$focus = '';
|
||||
|
||||
// now we'll deal with the case that the admin has submitted the form with changed settings
|
||||
if ($data = data_submitted() and confirm_sesskey()) {
|
||||
if ($data = data_submitted() and confirm_sesskey() and isset($data->action) and $data->action == 'save-settings') {
|
||||
require_capability('moodle/site:config', $context);
|
||||
if (admin_write_settings($data)) {
|
||||
redirect($PAGE->url, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
|
||||
|
@ -37,6 +37,7 @@
|
||||
<form action="{{actionurl}}" method="post" id="adminsettings">
|
||||
<div>
|
||||
<input type="hidden" name="sesskey" value="{{sesskey}}">
|
||||
<input type="hidden" name="action" value="save-settings">
|
||||
</div>
|
||||
<fieldset>
|
||||
<div class="clearer"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user