diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project_services/emails_on_push_service.rb | 7 | ||||
-rw-r--r-- | app/views/admin/services/_form.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/services/_form.html.haml | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/app/models/project_services/emails_on_push_service.rb b/app/models/project_services/emails_on_push_service.rb index e5d6c29c645..ec0c55bfd95 100644 --- a/app/models/project_services/emails_on_push_service.rb +++ b/app/models/project_services/emails_on_push_service.rb @@ -44,9 +44,12 @@ class EmailsOnPushService < Service end def fields + domains = Notify.allowed_email_domains.map { |domain| "user@#{domain}" }.join(", ") [ - { type: 'checkbox', name: 'send_from_committer_email', title: "Send from committer email if domain matches" }, - { type: 'checkbox', name: 'disable_diffs', title: "Disable code diffs" }, + { type: 'checkbox', name: 'send_from_committer_email', title: "Send from committer", + help: "Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. #{domains})." }, + { type: 'checkbox', name: 'disable_diffs', title: "Disable code diffs", + help: "Don't include possibly sensitive code diffs in notification body." }, { type: 'textarea', name: 'recipients', placeholder: 'Emails separated by whitespace' }, ] end diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index 7394925f01e..1cd6b8e75b1 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -22,6 +22,7 @@ - placeholder = field[:placeholder] - choices = field[:choices] - default_choice = field[:default_choice] + - help = field[:help] .form-group = f.label name, title, class: "control-label" @@ -36,6 +37,8 @@ = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } - elsif type == 'password' = f.password_field name, class: 'form-control' + - if help + %span.help-block= help .form-actions = f.submit 'Save', class: 'btn btn-save' diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 8008fa2b4b8..1b7265d56e8 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -35,6 +35,7 @@ - placeholder = field[:placeholder] - choices = field[:choices] - default_choice = field[:default_choice] + - help = field[:help] .form-group = f.label name, title, class: "control-label" @@ -49,6 +50,8 @@ = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } - elsif type == 'password' = f.password_field name, class: 'form-control' + - if help + %span.help-block= help .form-actions = f.submit 'Save', class: 'btn btn-save' |