MDL-49827 core: Expose the noemailever config in the admin UI

This commit is contained in:
Sirisha Garapati
2023-08-15 14:47:20 +10:00
parent 478abd671f
commit 5c203e8dc3
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -453,6 +453,12 @@ if ($hassiteconfig) {
// Outgoing mail configuration.
$temp = new admin_settingpage('outgoingmailconfig', new lang_string('outgoingmailconfig', 'admin'));
if (!empty($CFG->noemailever)) {
$noemaileverwarning = new \core\output\notification(get_string('noemaileverwarning', 'admin'),
\core\output\notification::NOTIFY_ERROR);
$temp->add(new admin_setting_heading('outgoingmaildisabled', '', $OUTPUT->render($noemaileverwarning)));
}
$temp->add(new admin_setting_heading('smtpheading', new lang_string('smtp', 'admin'),
new lang_string('smtpdetail', 'admin')));
+6
View File
@@ -40,6 +40,12 @@ if ($form->is_cancelled()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($headingtitle);
// Displaying noemailever warning.
if (!empty($CFG->noemailever)) {
$msg = get_string('noemaileverwarning', 'admin');
echo $OUTPUT->notification($msg, \core\output\notification::NOTIFY_ERROR);
}
$data = $form->get_data();
if ($data) {
$emailuser = new stdClass();
+1
View File
@@ -948,6 +948,7 @@ $string['neverdeleteruns'] = 'Never delete runs';
$string['newestdocindexed'] = 'Newest document indexed';
$string['nobookmarksforuser'] = 'You do not have any bookmarks.';
$string['nodatabase'] = 'No database';
$string['noemaileverwarning'] = '<strong>Note:</strong> All outgoing emails have been disabled';
$string['nohttpsformobilewarning'] = 'It is recommended to enable HTTPS with a valid certificate. The Moodle app will always try to use a secured connection first.';
$string['nomissingstrings'] = 'No missing strings';
$string['none'] = 'None';