Skip to content

Commit

Permalink
Merge branch 'MDL-49827-noemailever-ui' of https://github.com/NagaSir…
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 authored and sarjona committed Aug 17, 2023
2 parents 2870637 + 5c203e8 commit 59a6134
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions admin/settings/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@
// 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')));

Expand Down
6 changes: 6 additions & 0 deletions admin/testoutgoingmailconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
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();
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@
$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';
Expand Down

0 comments on commit 59a6134

Please sign in to comment.