summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-03-18 21:47:17 -0700
committerMarin Jankovski <maxlazio@gmail.com>2015-03-18 21:47:17 -0700
commit5aa97ce91ba0e2ef06ea8a03b10d36287fb8768b (patch)
tree61d0a1465d528bc9d9b16b34c2c1542e47003166
parentfa7ee3ade8f80059ec857c4af7a9e3071b10ec71 (diff)
downloadgitlab-ce-5aa97ce91ba0e2ef06ea8a03b10d36287fb8768b.tar.gz
Show test settings as disabled when service cannot be tested.
-rw-r--r--app/views/projects/services/_form.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index bb983229b1c..32e97a754cb 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -101,5 +101,6 @@
.form-actions
= f.submit 'Save', class: 'btn btn-save'
&nbsp;
- - if @service.valid? && @service.activated? && @service.can_test?
- = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: 'btn'
+ - if @service.valid? && @service.activated?
+ - disabled = @service.can_test? ? '':'disabled'
+ = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}"