diff options
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 4281e4c8376..8da6b853e67 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -129,8 +129,6 @@ class ProjectController < ApplicationController qgate_id = params[:qgate_id].to_i previous_qgate_id = params[:previous_qgate_id].to_i - ### TODO pass previous qgate to be able to dissociate - call_backend do if qgate_id == 0 Internal.quality_gates.dissociateProject(previous_qgate_id, project_id) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb index 4d620706d01..d04c800da8e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb @@ -1,23 +1,21 @@ <h1 class="admin-page-title"><%= message('project_quality_gate.page') -%></h1> <p class="admin-page-description"><%= message('project_quality_gate.page.description') -%></p> -<form method="POST" action="<%= ApplicationController.root_context -%>/project/set_qualitygate"> +<form id="select-quality-gate" method="POST" action="<%= ApplicationController.root_context -%>/project/set_qualitygate"> <input type="hidden" name="id" value="<%= @project_id -%>"/> <input type="hidden" name="previous_qgate_id" value="<%= @selected_qgate -%>"/> <select id="select-qgate" name="qgate_id"> <option value="" <%= "selected='selected'" unless @selected_qgate -%>><%= message 'project_quality_gate.default_qgate' -%></option> - <% puts @selected_qgate %> <optgroup> <% qgates = Api::Utils.insensitive_sort(@all_quality_gates) { |qgate| qgate.name } qgates.each do |qgate| %> <option value="<%= qgate.id -%>" <%= "selected='selected'" if @selected_qgate && (@selected_qgate == qgate.id) -%>><%= h qgate.name -%></option> - <% puts qgate.name, qgate.id == @selected_qgate %> <% end %> </optgroup> </select> - <%= submit_tag message('update_verb'), :id => "submit", :disable_with => message('updating') %> + <%= submit_tag message('update_verb'), :id => "submit-qgate", :disable_with => message('updating') %> </form> |