summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorSullivan SENECHAL <soullivaneuh@gmail.com>2014-10-01 02:48:41 +0200
committerSullivan SENECHAL <soullivaneuh@gmail.com>2014-10-03 13:54:37 +0200
commitd1fa3b336d1d3e3c1f9a10ca007e3d1193e5e205 (patch)
tree4ab193d600aa60182b1f0ff01bfd116b640b274f /app/views
parent43217dd5ddcb7557ea0c7300c6a02253f1b99d7d (diff)
downloadgitlab-ce-d1fa3b336d1d3e3c1f9a10ca007e3d1193e5e205.tar.gz
Add Pushover service integration
That introduce select field type for services options.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/services/_form.html.haml5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index a5db7969a68..16d59d1fe9d 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -28,8 +28,11 @@
- @service.fields.each do |field|
- name = field[:name]
+ - value = @service.send(name)
- type = field[:type]
- placeholder = field[:placeholder]
+ - choices = field[:choices]
+ - default_choice = field[:default_choice]
.form-group
= f.label name, class: "control-label"
@@ -40,6 +43,8 @@
= f.text_area name, rows: 5, class: "form-control", placeholder: placeholder
- elsif type == 'checkbox'
= f.check_box name
+ - elsif type == 'select'
+ = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" }
.form-actions
= f.submit 'Save', class: 'btn btn-save'