]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2436 Fix problem with delete button on filters
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 22 Jun 2011 10:41:39 +0000 (12:41 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 22 Jun 2011 10:41:39 +0000 (12:41 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/filters/new.html.erb

index 6475a4d1ed6da7067e0e85ea4dd5a1f2c0d5de35..5428a8aeb1eba5135ef2d681d3b6872c84397fad 100644 (file)
@@ -163,7 +163,8 @@ table#columns td {
             <input type="submit" value="Save & Close" />
             <span class="spacer"> </span>
             <% if @filter.id %>
-              <input name="delete" class="red-button" type="submit" value="Delete" onclick="return confirm('Do you want to delete this filter ?');">
+              <input name="delete" class="red-button" value="Delete" type="button" 
+                     onclick="if (confirm('Do you want to delete this filter ?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = '<%= url_for :action => 'delete', :id => @filter.id %>';f.submit(); };return false;">
               <span class="spacer"> </span>
               <a href="<%= url_for :action => 'index', :name => @filter.name -%>">Cancel</a>
             <% else %>