Commit f0b78a85 authored by Douwe Maan's avatar Douwe Maan

Clarify EmailsOnPushService options.

parent 969de4c1
......@@ -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
......
......@@ -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'
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment