Feature #21503 » Email_Self_Notification_Setting.diff
| app/models/user_preference.rb (working copy) | ||
|---|---|---|
|
def initialize(attributes=nil, *args)
|
||
|
super
|
||
|
if new_record? && !(attributes && attributes.key?(:hide_mail))
|
||
|
self.hide_mail = Setting.default_users_hide_mail?
|
||
|
if new_record?
|
||
|
if !(attributes && attributes.key?(:hide_mail))
|
||
|
self.hide_mail = Setting.default_users_hide_mail?
|
||
|
end
|
||
|
if !(attributes && attributes.key?(:no_self_notified))
|
||
|
self.no_self_notified = !Setting.default_users_self_notification?
|
||
|
end
|
||
|
end
|
||
|
self.others ||= {}
|
||
|
end
|
||
| app/views/settings/_authentication.html.erb (working copy) | ||
|---|---|---|
|
<div class="tabular settings">
|
||
|
<p><%= setting_check_box :default_users_hide_mail, :label => :field_hide_mail %></p>
|
||
|
<p><%= setting_check_box :default_users_self_notification, :label => :field_self_notification %></p>
|
||
|
</div>
|
||
|
</fieldset>
|
||
| config/locales/en.yml (working copy) | ||
|---|---|---|
|
field_done_ratio: "% Done"
|
||
|
field_auth_source: Authentication mode
|
||
|
field_hide_mail: Hide my email address
|
||
|
field_self_notification: Email self notification
|
||
|
field_comments: Comment
|
||
|
field_url: URL
|
||
|
field_start_page: Start page
|
||
| config/settings.yml (working copy) | ||
|---|---|---|
|
# multiple values accepted, comma separated
|
||
|
default_users_hide_mail:
|
||
|
default: 1
|
||
|
default_users_self_notification:
|
||
|
default: 1
|
||
|
repositories_encodings:
|
||
|
default: ''
|
||
|
# encoding used to convert commit logs to UTF-8
|
||