Patch #1382 » add_cc_notification.diff
| test/functional/settings_controller_test.rb (working copy) | ||
|---|---|---|
| 40 | 40 |
|
| 41 | 41 |
def test_post_edit_notifications |
| 42 | 42 |
post :edit, :settings => {:mail_from => 'functional@test.foo',
|
| 43 |
:mail_cc => 'functionalcc@test.foo', |
|
| 43 | 44 |
:bcc_recipients => '0', |
| 44 | 45 |
:notified_events => %w(issue_added issue_updated news_added), |
| 45 | 46 |
:emails_footer => 'Test footer' |
| 46 | 47 |
} |
| 47 | 48 |
assert_redirected_to 'settings/edit' |
| 48 | 49 |
assert_equal 'functional@test.foo', Setting.mail_from |
| 50 |
assert_equal 'functionalcc@test.foo', Setting.mail_cc |
|
| 49 | 51 |
assert !Setting.bcc_recipients? |
| 50 | 52 |
assert_equal %w(issue_added issue_updated news_added), Setting.notified_events |
| 51 | 53 |
assert_equal 'Test footer', Setting.emails_footer |
| app/models/mailer.rb (working copy) | ||
|---|---|---|
| 210 | 210 |
recipients [] |
| 211 | 211 |
cc [] |
| 212 | 212 |
end |
| 213 |
cc << Setting.mail_cc |
|
| 213 | 214 |
super |
| 214 | 215 |
end |
| 215 | 216 |
|
| app/views/settings/_notifications.rhtml (working copy) | ||
|---|---|---|
| 4 | 4 |
<p><label><%= l(:setting_mail_from) %></label> |
| 5 | 5 |
<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p> |
| 6 | 6 | |
| 7 |
<p><label><%= l(:setting_mail_cc) %></label> |
|
| 8 |
<%= text_field_tag 'settings[mail_cc]', Setting.mail_cc, :size => 60 %></p> |
|
| 9 | ||
| 7 | 10 |
<p><label><%= l(:setting_bcc_recipients) %></label> |
| 8 | 11 |
<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %> |
| 9 | 12 |
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p> |
| lang/en.yml (working copy) | ||
|---|---|---|
| 191 | 191 |
setting_attachment_max_size: Attachment max. size |
| 192 | 192 |
setting_issues_export_limit: Issues export limit |
| 193 | 193 |
setting_mail_from: Emission email address |
| 194 |
setting_mail_cc: CC email address for all notifications |
|
| 194 | 195 |
setting_bcc_recipients: Blind carbon copy recipients (bcc) |
| 195 | 196 |
setting_host_name: Host name |
| 196 | 197 |
setting_text_formatting: Text formatting |
| config/settings.yml (working copy) | ||
|---|---|---|
| 44 | 44 |
default: '25,50,100' |
| 45 | 45 |
mail_from: |
| 46 | 46 |
default: redmine@somenet.foo |
| 47 |
mail_cc: |
|
| 48 |
default: |
|
| 47 | 49 |
bcc_recipients: |
| 48 | 50 |
default: 1 |
| 49 | 51 |
text_formatting: |