diff --git a/js/tbl_change.js b/js/tbl_change.js index 2d33884a9..896700bb6 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -165,7 +165,7 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType){ // Unchecks the Ignore checkbox for the current row $("input[name='insert_ignore_" + multi_edit + "']").attr({'checked': false}); - $this_input = $("input[name='fields[multi_edit][" + multi_edit + "][" + urlField + "]']"); + var $this_input = $("input[name='fields[multi_edit][" + multi_edit + "][" + urlField + "]']"); // Does this field come from datepicker? if ($this_input.data('comes_from') == 'datepicker') { @@ -214,11 +214,11 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType){ } } //validate for integer type - if(theType.substring(0,3)=="int"){ - - if(isNaN(dt.value)){ - dt.className="invalid_value"; - return false; + if(theType.substring(0,3) == "int"){ + $this_input.removeClass("invalid_value"); + if(isNaN($this_input.val())){ + $this_input.addClass("invalid_value"); + return false; } } } diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 4d18832f6..25692d27f 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -1673,8 +1673,10 @@ table#serverconnection_trg_local { /** * Validation error message styles */ -.invalid_value -{background:#F00;} +input[type=text].invalid_value, +.invalid_value { + background:#F00; +} /** * Ajax notification styling