Redirect properly after saving notification recipients and display a nice friendly message to the user.
This commit is contained in:
parent
0c03044fca
commit
1a9f98217e
2 changed files with 9 additions and 1 deletions
|
@ -4,7 +4,14 @@ class Admin::Blog::SettingsController < Admin::BaseController
|
||||||
@recipients = BlogComment::Notification.recipients
|
@recipients = BlogComment::Notification.recipients
|
||||||
|
|
||||||
if request.post?
|
if request.post?
|
||||||
BlogComment::Notification.recipients == params[:recipients]
|
BlogComment::Notification.recipients = params[:recipients]
|
||||||
|
flash[:notice] = t('admin.blog.settings.notification_recipients.updated',
|
||||||
|
:recipients => BlogComment::Notification.recipients)
|
||||||
|
unless request.xhr? or from_dialog?
|
||||||
|
redirect_back_or_default(admin_blog_posts_path)
|
||||||
|
else
|
||||||
|
render :text => "<script type='text/javascript'>parent.window.location = '#{admin_blog_posts_path}';</script>"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ en:
|
||||||
explanation: Every time someone comments on a blog post, Refinery sends out an email to say there is a new comment.
|
explanation: Every time someone comments on a blog post, Refinery sends out an email to say there is a new comment.
|
||||||
hint: When a new comment is added, Refinery will send an email notification to you.
|
hint: When a new comment is added, Refinery will send an email notification to you.
|
||||||
example: "Enter your email address(es) like: jack@work.com, jill@office.com"
|
example: "Enter your email address(es) like: jack@work.com, jill@office.com"
|
||||||
|
updated: Notification recipients have been set to '{{recipients}}'
|
||||||
submenu:
|
submenu:
|
||||||
categories:
|
categories:
|
||||||
title: Categories
|
title: Categories
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue