From cbea221c569d0edcd18f311a004e5e2dca80af51 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 6 May 2011 10:16:05 +0200 Subject: [PATCH] SONAR-1973 Fix bug on submit button If two reviews or false-positive were edited at the same time, the submit buttons would not behave correctly as they had the same name. --- .../app/views/reviews/_violation_comment_form.html.erb | 4 ++-- .../app/views/reviews/_violation_false_positive_form.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb index d045ad90c28..fbdd6635866 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb @@ -10,9 +10,9 @@
- +
- <%= submit_to_remote "submit_btn", button, :url => { :action => 'violation_save_comment'}, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'vId'+params[:id] -%> + <%= submit_to_remote "submit_btn"+params[:id] , button, :url => { :action => 'violation_save_comment'}, :html => { :id => "submit_btn"+params[:id], :disabled => "true" }, :update => 'vId'+params[:id] -%>   <%= link_to_remote 'Cancel', :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb index e78ea5e7dd8..d11e374e1e5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_false_positive_form.html.erb @@ -13,8 +13,8 @@ <% end %>

<%= title -%>

- - <%= submit_to_remote "submit_btn", button, :url => { :action => 'violation_flag_as_false_positive' }, :html => { :id => "submit_btn", :disabled => "true" }, :update => 'vId'+params[:id] -%> + + <%= submit_to_remote "submit_btn"+params[:id], button, :url => { :action => 'violation_flag_as_false_positive' }, :html => { :id => "submit_btn"+params[:id], :disabled => "true" }, :update => 'vId'+params[:id] -%>   <%= link_to_remote 'Cancel', :url => {:action => 'display_violation', :id => params[:id]}, :update => 'vId' + params[:id] -%> -- 2.39.5