Prerequisites to the custom fields

SVN:trunk[3911]
This commit is contained in:
Guillaume Lajarige
2016-02-12 13:44:10 +00:00
parent 064ae11ba8
commit 77f8129fac

View File

@@ -11,7 +11,9 @@ $(function()
{
validators: null,
validate_callback: 'validate', // When using an anonymous function, use the 'me' parameter to acces the current widget : function(me){ return me.validate(); },
get_current_value_callback: 'getCurrentValue'
on_validation_callback: function(data){ },
get_current_value_callback: 'getCurrentValue',
},
// the constructor
@@ -188,17 +190,7 @@ $(function()
}
}
// Rendering visual feedback on the field
this.element.removeClass('has-success has-warning has-error')
this.element.find('.help-block').html('');
if(!oResult.is_valid)
{
this.element.addClass('has-error');
for(var i in oResult.error_messages)
{
this.element.find('.help-block').append($('<p>' + oResult.error_messages[i] + '</p>'));
}
}
this.options.on_validation_callback();
return oResult;
},