Commit 745aad41 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix_service_trigger_ui' into 'master'

Fix service UI

There was a small bug in the service UI that caused an empty 'Trigger' label to be shown. After this change the 'Trigger' field is not shown when only one event type of supported.

Before:
![Screen Shot 2015-03-16 at 7.40.31 PM](https://gitlab.com/uploads/dblessing/gitlab-ce/0457a0b918/Screen_Shot_2015-03-16_at_7.40.31_PM.png)

I think in the future there are other things we can do to enforce at least one selected event type and also show the user what the singular event type is if only one is supported. That will take time to work out and this is definitely acceptable for the time.

See merge request !395
parents 94238a9a 6a269450
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
= preserve do = preserve do
= markdown @service.help = markdown @service.help
- if @service.supported_events.length > 1
.form-group .form-group
= f.label :url, "Trigger", class: 'control-label' = f.label :url, "Trigger", class: 'control-label'
- if @service.supported_events.length > 1
.col-sm-10 .col-sm-10
- if @service.supported_events.include?("push") - if @service.supported_events.include?("push")
%div %div
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
.col-sm-10 .col-sm-10
= f.check_box :active = f.check_box :active
- if @service.supported_events.length > 1
.form-group .form-group
= f.label :url, "Trigger", class: 'control-label' = f.label :url, "Trigger", class: 'control-label'
- if @service.supported_events.length > 1
.col-sm-10 .col-sm-10
- if @service.supported_events.include?("push") - if @service.supported_events.include?("push")
%div %div
......
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