Skip to content

Commit

Permalink
A very basic message informing the newsletter has been sent successfully
Browse files Browse the repository at this point in the history
Signed-off-by: emanuele <emanuele45@gmail.com>
  • Loading branch information
emanuele45 committed Dec 13, 2013
1 parent e00baaa commit f74a511
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sources/admin/ManageNews.controller.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
24 changes: 24 additions & 0 deletions themes/default/ManageNews.template.php
Expand Up @@ -347,4 +347,28 @@ function template_email_members_send()
doAutoSubmit();
// ]]></script>';
}

/**
* Template for informing the user the sending succeeded
*/
function template_email_members_succeeded()
{
global $context, $txt, $scripturl;

echo '
<div id="admincenter">
<h3 class="category_header">
<a class="hdicon cat_img_helptopics help" href="', $scripturl, '?action=quickhelp;help=email_members" onclick="return reqOverlayDiv(this.href);" title="', $txt['help'], '"></a> ', $txt['admin_newsletters'], '
</h3>
<div class="windowbg">
<div class="content">
<div class="successbox">
', $txt['email_members_succeeded'], '
</div>
<hr />
<a href="', $scripturl, '?action=admin" class="linkbutton right_submit">', $txt['admin_back_to'], '</a>
</div>
</div>
</div>';
}
2 changes: 2 additions & 0 deletions themes/default/languages/english/Admin.english.php
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit f74a511

Please sign in to comment.