From f0b78a852933a54173bb9b4ceddba44b52dc3cfa Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 25 Feb 2015 15:56:42 +0100 Subject: [PATCH] Clarify EmailsOnPushService options. --- app/models/project_services/emails_on_push_service.rb | 7 +++++-- app/views/admin/services/_form.html.haml | 3 +++ 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 e5d6c29c64..ec0c55bfd9 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 7394925f01..1cd6b8e75b 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 8008fa2b4b..1b7265d56e 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'