diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index c8cb4760f..e0a7baac7 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -2103,7 +2103,7 @@ EOF
$('#{$iId}_console_form').console_form_handler('alignColumns');
$('#{$iId}_console_form').console_form_handler('option', 'field_set', $('#{$iId}_field_set'));
// field_change must be processed to refresh the hidden value at anytime
- $('#{$iId}_console_form').bind('value_change', function() { $('#{$iId}').val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); console.error($('#{$iId}').val()); });
+ $('#{$iId}_console_form').bind('value_change', function() { $('#{$iId}').val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); });
// Initialize the hidden value with current state
// update_value is triggered when preparing the wizard helper object for ajax calls
$('#{$iId}').bind('update_value', function() { $(this).val(JSON.stringify($('#{$iId}_field_set').triggerHandler('get_current_values'))); });
diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js
index add2ace78..60ebf6416 100644
--- a/js/forms-json-utils.js
+++ b/js/forms-json-utils.js
@@ -200,11 +200,16 @@ function ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain)
// Let's remember the first input with an error, so that we can put back the focus on it later
oFormErrors['input_'+sFormId] = sFieldId;
}
- // Visual feedback
- $('#v_'+sFieldId).html('
');
- //Avoid replacing exisiting tooltip for periodically checked element (like CKeditor fields)
+
+ if ($('#v_'+sFieldId+' img').length == 0)
+ {
+ $('#v_'+sFieldId).html('
');
+ }
+ //Avoid replacing exisiting tooltip for periodically checked element (like CKeditor fields)
if($('#v_'+sFieldId).tooltip( "instance" ) === undefined)
{
+ // Visual feedback
+
$('#v_'+sFieldId).tooltip({
items: 'span',
tooltipClass: 'form_field_error',
@@ -343,8 +348,13 @@ function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue,
ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain);
- // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92
- setTimeout(function(){ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue);}, 500);
+ if ($('#'+sFieldId).data('timeout_validate') == undefined) {
+ // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92
+ var iTimeoutValidate = setInterval(function () {
+ ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue);
+ }, 500);
+ $('#'+sFieldId).data('timeout_validate', iTimeoutValidate);
+ }
}
/*