From f74a51143cd617c2e5e9ae727aa396d225b05d0f Mon Sep 17 00:00:00 2001 From: emanuele Date: Fri, 13 Dec 2013 10:37:23 +0100 Subject: [PATCH] A very basic message informing the newsletter has been sent successfully Signed-off-by: emanuele --- sources/admin/ManageNews.controller.php | 9 ++++++- themes/default/ManageNews.template.php | 24 +++++++++++++++++++ .../languages/english/Admin.english.php | 2 ++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/sources/admin/ManageNews.controller.php b/sources/admin/ManageNews.controller.php index bdef95e9fb..eddf1e43a2 100644 --- a/sources/admin/ManageNews.controller.php +++ b/sources/admin/ManageNews.controller.php @@ -466,6 +466,13 @@ public function action_mailingsend($clean_only = false) { global $txt, $context, $scripturl, $modSettings, $user_info; + // A nice successful screen if you did it + if (isset($_REQUEST['success'])) + { + $context['sub_template'] = 'email_members_succeeded'; + loadTemplate('ManageNews'); + return; + } if (isset($_POST['preview'])) { $context['preview'] = true; @@ -785,7 +792,7 @@ public function action_mailingsend($clean_only = false) { // Log this into the admin log. logAction('newsletter', array(), 'admin'); - redirectexit('action=admin'); + redirectexit('action=admin;area=news;sa=mailingsend;success'); } $context['start'] = $last_id_member; diff --git a/themes/default/ManageNews.template.php b/themes/default/ManageNews.template.php index adff2cf633..3bb2f28b59 100644 --- a/themes/default/ManageNews.template.php +++ b/themes/default/ManageNews.template.php @@ -347,4 +347,28 @@ function template_email_members_send() doAutoSubmit(); // ]]>'; +} + +/** + * Template for informing the user the sending succeeded + */ +function template_email_members_succeeded() +{ + global $context, $txt, $scripturl; + + echo ' +
+

+ ', $txt['admin_newsletters'], ' +

+
+
+
+ ', $txt['email_members_succeeded'], ' +
+
+ ', $txt['admin_back_to'], ' +
+
+
'; } \ No newline at end of file diff --git a/themes/default/languages/english/Admin.english.php b/themes/default/languages/english/Admin.english.php index 149dee2fad..60ef232bf9 100644 --- a/themes/default/languages/english/Admin.english.php +++ b/themes/default/languages/english/Admin.english.php @@ -4,6 +4,7 @@ global $settings, $scripturl; $txt['admin_boards'] = 'Boards'; +$txt['admin_back_to'] = 'Back to admin panel'; $txt['admin_users'] = 'Members'; $txt['admin_newsletters'] = 'Newsletters'; $txt['include_these'] = 'Members to include'; @@ -153,6 +154,7 @@ $txt['email_as_pms'] = 'Send this to these groups using personal messages.'; $txt['email_continue'] = 'Continue'; $txt['email_done'] = 'done.'; +$txt['email_members_succeeded'] = 'You have successfully sent your newsletter!'; $txt['ban_title'] = 'Ban List'; $txt['ban_ip'] = 'IP banning: (e.g. 192.168.12.213 or 128.0.*.*) - one entry per line';