summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-25 15:56:42 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-25 16:40:48 +0100
commitf0b78a852933a54173bb9b4ceddba44b52dc3cfa (patch)
tree412ab2eec480f41348ded30f74b4151e63d235e1 /app
parent969de4c15a876ab9096f163ef6182571ca199492 (diff)
downloadgitlab-ce-f0b78a852933a54173bb9b4ceddba44b52dc3cfa.tar.gz
Clarify EmailsOnPushService options.
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/emails_on_push_service.rb7
-rw-r--r--app/views/admin/services/_form.html.haml3
-rw-r--r--app/views/projects/services/_form.html.haml3
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'