Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f0b78a85
Commit
f0b78a85
authored
Feb 25, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify EmailsOnPushService options.
parent
969de4c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
app/models/project_services/emails_on_push_service.rb
app/models/project_services/emails_on_push_service.rb
+5
-2
app/views/admin/services/_form.html.haml
app/views/admin/services/_form.html.haml
+3
-0
app/views/projects/services/_form.html.haml
app/views/projects/services/_form.html.haml
+3
-0
No files found.
app/models/project_services/emails_on_push_service.rb
View file @
f0b78a85
...
@@ -44,9 +44,12 @@ class EmailsOnPushService < Service
...
@@ -44,9 +44,12 @@ class EmailsOnPushService < Service
end
end
def
fields
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:
'send_from_committer_email'
,
title:
"Send from committer"
,
{
type:
'checkbox'
,
name:
'disable_diffs'
,
title:
"Disable code diffs"
},
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'
},
{
type:
'textarea'
,
name:
'recipients'
,
placeholder:
'Emails separated by whitespace'
},
]
]
end
end
...
...
app/views/admin/services/_form.html.haml
View file @
f0b78a85
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
-
placeholder
=
field
[
:placeholder
]
-
placeholder
=
field
[
:placeholder
]
-
choices
=
field
[
:choices
]
-
choices
=
field
[
:choices
]
-
default_choice
=
field
[
:default_choice
]
-
default_choice
=
field
[
:default_choice
]
-
help
=
field
[
:help
]
.form-group
.form-group
=
f
.
label
name
,
title
,
class:
"control-label"
=
f
.
label
name
,
title
,
class:
"control-label"
...
@@ -36,6 +37,8 @@
...
@@ -36,6 +37,8 @@
=
f
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
=
f
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
-
elsif
type
==
'password'
-
elsif
type
==
'password'
=
f
.
password_field
name
,
class:
'form-control'
=
f
.
password_field
name
,
class:
'form-control'
-
if
help
%span
.help-block
=
help
.form-actions
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-save'
=
f
.
submit
'Save'
,
class:
'btn btn-save'
app/views/projects/services/_form.html.haml
View file @
f0b78a85
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
-
placeholder
=
field
[
:placeholder
]
-
placeholder
=
field
[
:placeholder
]
-
choices
=
field
[
:choices
]
-
choices
=
field
[
:choices
]
-
default_choice
=
field
[
:default_choice
]
-
default_choice
=
field
[
:default_choice
]
-
help
=
field
[
:help
]
.form-group
.form-group
=
f
.
label
name
,
title
,
class:
"control-label"
=
f
.
label
name
,
title
,
class:
"control-label"
...
@@ -49,6 +50,8 @@
...
@@ -49,6 +50,8 @@
=
f
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
=
f
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
-
elsif
type
==
'password'
-
elsif
type
==
'password'
=
f
.
password_field
name
,
class:
'form-control'
=
f
.
password_field
name
,
class:
'form-control'
-
if
help
%span
.help-block
=
help
.form-actions
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-save'
=
f
.
submit
'Save'
,
class:
'btn btn-save'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment