Project

General

Profile

Feature #21503 » Email_Self_Notification_Setting.diff

Mike Sweetman, 2015-12-13 18:52

View differences:

app/models/user_preference.rb (working copy)
25 25

  
26 26
  def initialize(attributes=nil, *args)
27 27
    super
28
    if new_record? && !(attributes && attributes.key?(:hide_mail))
29
      self.hide_mail = Setting.default_users_hide_mail?
28
    if new_record?
29
      if !(attributes && attributes.key?(:hide_mail))
30
        self.hide_mail = Setting.default_users_hide_mail?
31
      end
32
      if !(attributes && attributes.key?(:no_self_notified))
33
        self.no_self_notified = !Setting.default_users_self_notification?
34
      end
30 35
    end
31 36
    self.others ||= {}
32 37
  end
app/views/settings/_authentication.html.erb (working copy)
41 41

  
42 42
  <div class="tabular settings">
43 43
    <p><%= setting_check_box :default_users_hide_mail, :label => :field_hide_mail %></p>
44
    <p><%= setting_check_box :default_users_self_notification, :label => :field_self_notification %></p>
44 45
  </div>
45 46
</fieldset>
46 47

  
config/locales/en.yml (working copy)
295 295
  field_done_ratio: "% Done"
296 296
  field_auth_source: Authentication mode
297 297
  field_hide_mail: Hide my email address
298
  field_self_notification: Email self notification
298 299
  field_comments: Comment
299 300
  field_url: URL
300 301
  field_start_page: Start page
config/settings.yml (working copy)
219 219
# multiple values accepted, comma separated
220 220
default_users_hide_mail:
221 221
  default: 1
222
default_users_self_notification:
223
  default: 1
222 224
repositories_encodings:
223 225
  default: ''
224 226
# encoding used to convert commit logs to UTF-8
(1-1/2)