]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4093 Fix JS error on Chrom* browsers, cleanup
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 17 Mar 2014 15:27:43 +0000 (16:27 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 17 Mar 2014 15:27:43 +0000 (16:27 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb

index 4281e4c83769430879b72464c25a6ef508a1788a..8da6b853e676c560f1efee6f01bbc68f6edb6b63 100644 (file)
@@ -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)
index 4d620706d01e40701d0bec3d9a2ab82300bc0809..d04c800da8e47c7521ddde929d062571693e5366 100644 (file)
@@ -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>