Skip to content

Commit

Permalink
Merge branch 'MDL-81623-405' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_405_STABLE
  • Loading branch information
andrewnicols committed Mar 7, 2025
2 parents 8035c1f + 63ff5f9 commit 1a8c5df
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2189,10 +2189,11 @@ public function upgradekey_form_page($url) {

$output = '';
$output .= $this->header();
$output .= $this->container_start('upgradekeyreq');
$output .= $this->heading(get_string('upgradekeyreq', 'core_admin'));
$output .= $this->container_start('upgradekeyreq w-25');
$output .= html_writer::start_tag('form', array('method' => 'POST', 'action' => $url));
$output .= html_writer::empty_tag('input', [
'id' => 'upgradekey',
'name' => 'upgradekey',
'type' => 'password',
'class' => 'form-control w-auto',
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/form_input_toggle_sensitive.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"sensitiveinput": "<input type=\"password\" name=\"password\" id=\"password\">"
}
}}
<div class="toggle-sensitive-wrapper {{#smallscreensonly}}small-screens-only{{/smallscreensonly}} input-group mb-3">
<div class="toggle-sensitive-wrapper {{#smallscreensonly}}small-screens-only{{/smallscreensonly}} input-group">
{{{sensitiveinput}}}
<div class="input-group-append">
<button class="toggle-sensitive-btn btn btn-secondary" type="button" {{!
Expand Down
3 changes: 3 additions & 0 deletions lib/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2555,6 +2555,9 @@ function check_upgrade_key($upgradekeyhash) {
if ($upgradekeyhash === null or $upgradekeyhash !== sha1($CFG->config_php_settings['upgradekey'])) {
if (!$PAGE->headerprinted) {
$PAGE->set_title(get_string('upgradekeyreq', 'admin'));
$PAGE->requires->js_call_amd('core/togglesensitive', 'init', ['upgradekey']);

/** @var core_admin_renderer $output */
$output = $PAGE->get_renderer('core', 'admin');
echo $output->upgradekey_form_page(new moodle_url('/admin/index.php', array('cache' => 0)));
die();
Expand Down
4 changes: 4 additions & 0 deletions theme/boost/scss/moodle/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@
text-align: left;
}

#page-admin-index .upgradekeyreq {
min-width: 220px;
}

#page-admin-index .adminwarning.availableupdatesinfo .moodleupdateinfo span {
display: block;
}
Expand Down
4 changes: 4 additions & 0 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -26609,6 +26609,10 @@ img.icon {
text-align: left;
}

#page-admin-index .upgradekeyreq {
min-width: 220px;
}

#page-admin-index .adminwarning.availableupdatesinfo .moodleupdateinfo span {
display: block;
}
Expand Down
4 changes: 4 additions & 0 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -26609,6 +26609,10 @@ img.icon {
text-align: left;
}

#page-admin-index .upgradekeyreq {
min-width: 220px;
}

#page-admin-index .adminwarning.availableupdatesinfo .moodleupdateinfo span {
display: block;
}
Expand Down

0 comments on commit 1a8c5df

Please sign in to comment.