diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 042f7edeedd..e271f6509e5 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -245,6 +245,10 @@ function ajax_constantonoff($code,$input=array()) if (input.length > 0) { $.each(input, function(key,value) { $( "#" + value).removeAttr("disabled"); + if ( $( "#" + value).hasClass("butActionRefused") == true ) { + $( "#" + value).removeClass("butActionRefused"); + $( "#" + value).addClass("butAction"); + } }); } }); @@ -263,6 +267,10 @@ function ajax_constantonoff($code,$input=array()) if (input.length > 0) { $.each(input, function(key,value) { $( "#" + value).attr("disabled", true); + if ( $( "#" + value).hasClass("butAction") == true ) { + $( "#" + value).removeClass("butAction"); + $( "#" + value).addClass("butActionRefused"); + } }); } });