From 67c8b7efeb26ab3c5f296be3107c0e1a88ed84bc Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 16 Jan 2014 11:55:53 +0100 Subject: [PATCH] SONAR-4923 It could not be possible to change the severity of an inactive rule --- .../WEB-INF/app/views/rules_configuration/_rule.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb index 35e9051bb61..c8da0400e9e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb @@ -1,4 +1,5 @@ <% #locals = rule, profile, parent_profile -%> +<% is_activated = !rule.activeRuleId.nil? %>
@@ -14,9 +15,9 @@ data:'level='+$j('#levels_select_#{rule.id} :selected').val()})}" %> - <%= check_box_tag(check_box_id, 'yes', !rule.activeRuleId.nil?, :onclick => activate_rule, :disabled => !enable_modification || rule.inherited? || rule.overrides?) %> + <%= check_box_tag(check_box_id, 'yes', is_activated, :onclick => activate_rule, :disabled => !enable_modification || rule.inherited? || rule.overrides?) %> <%= select_tag(select_box_id, options_for_select(RulesConfigurationController::RULE_PRIORITIES, rule.severity), - {:onchange => changel_level, :disabled => (!(enable_modification))}) %> + {:onchange => changel_level, :disabled => (!(enable_modification) || !is_activated)}) %> <% if rule.inherited? %> Inherited from parent @@ -88,7 +89,7 @@ <% end %> - <% if rule.activeRuleId %> + <% if is_activated %>
<%= render :partial => 'active_rule_note', :locals => {:rule => rule} %>
-- 2.39.5