MDL-49827 core: Expose the noemailever config in the admin UI
This commit is contained in:
@@ -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')));
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user