[TELE-799] remove custom error displaying
This commit is contained in:
parent
2632b8791c
commit
f569ca0cfa
|
@ -17,36 +17,6 @@ $(function() {
|
|||
}
|
||||
// End of General method to get elements thanks to regex !
|
||||
|
||||
|
||||
// unite all errors to the top of the form
|
||||
var $error_notice = $('form.quixote > div.errornotice');
|
||||
var $errors = $('form.quixote div.error:visible');
|
||||
if ($errors.length && $error_notice.length == 0) {
|
||||
$error_notice = $('<div class="errornotice"></div>');
|
||||
$('form.quixote').prepend($error_notice);
|
||||
}
|
||||
$errors.each(function() {
|
||||
var field_label = $(this).parents('.widget').find('.title label').text().replace(/[ :\*]+$/g, '');
|
||||
var $error_text = $('<p>' + field_label + ' : ' + $(this).text() + '</p>');
|
||||
$(this).hide();
|
||||
$error_notice.append($error_text);
|
||||
});
|
||||
// End of unite all errors ...
|
||||
|
||||
// Errors in profile have same behavior than forms' errors
|
||||
var $profile_errors = $('div.a2-block ul.errorlist');
|
||||
var $profile_error_notice = $('div.a2-block > div.errorlist');
|
||||
if ($profile_errors.length && $profile_error_notice.length == 0) {
|
||||
$profile_error_notice = $('<div class="errorlist"></div>');
|
||||
$('div.a2-block').prepend($profile_error_notice);
|
||||
}
|
||||
$profile_errors.each(function() {
|
||||
var field_label = $(this).next().find('label').text().replace(/[ :\*]+$/g, '');
|
||||
var $error_text = $('<p>' + field_label + ' : ' + $(this).text() + '</p>');
|
||||
$(this).hide();
|
||||
$profile_error_notice.append($error_text);
|
||||
});
|
||||
|
||||
var $invisible = $('.invisible');
|
||||
$invisible.each(function() {
|
||||
if ($(this).find("textarea").text() == '') {
|
||||
|
|
Loading…
Reference in New Issue