active_param = ActiveRuleParameter.new(:rules_parameter => rule_param, :active_rule => active_rule ) if active_param.nil?
old_value = active_param.value
active_param.value = value
- if active_param.save && active_param.valid?
+ if active_param.save! && active_param.valid?
active_param.reload
java_facade.ruleParamChanged(profile.id, active_rule.id, rule_param.name, old_value, value, current_user.name)
end
<%= parameter.name -%>
</td>
<td class="form-val-cell">
- <%= form_remote_tag :url => {:action => 'update_param', :id => active_param_id, :profile_id => profile.id, :param_id => parameter.id, :active_rule_id => active_rule_id},
- :update => "rule_#{rule.id}",
+ <%= form_remote_tag :url => {:action => :update_param, :id => active_param_id, :profile_id => profile.id, :param_id => parameter.id, :active_rule_id => active_rule_id},
+ :update => {:success => "rule_#{rule.id}", :failure => "error_#{rule.id}"},
:loading => "$('param_loading_#{parameter.id}').show();",
:complete => "$('desc_#{rule.id}').show();",
+ :failure => "$('error_#{rule.id}').show();$('param_loading_#{parameter.id}').hide();",
:html => {:name => "form-#{u parameter.name}"} %>
<%
textfield += "<br/>"
end
%>
+ <div id="error_<%= rule.id -%>" class="error" style="display: none"></div>
<span id="<%= span_id -%>"><%= textfield -%></span>
<% if !read_only %>