Prevent devhub from showing success message when edit errors occur
This commit is contained in:
Родитель
7b2ee4cd68
Коммит
6c8ef890ff
|
@ -335,11 +335,13 @@ function addonFormSubmit() {
|
|||
parent_div.find(".item").removeClass("loaded").addClass("loading");
|
||||
var $document = $(document),
|
||||
scrollBottom = $document.height() - $document.scrollTop(),
|
||||
$form = $(this),
|
||||
hasErrors = $form.find('.errorlist').length;
|
||||
$form = $(this);
|
||||
|
||||
$.post($form.attr('action'), $form.serialize(), function(d) {
|
||||
parent_div.html(d).each(addonFormSubmit);
|
||||
// The HTML has changed after we posted the form, thus the need to retrieve the new HTML
|
||||
$form = parent_div.find('form');
|
||||
var hasErrors = $form.find('.errorlist').length;
|
||||
$('.tooltip').tooltip('#tooltip');
|
||||
if (!hasErrors && old_baseurl && old_baseurl !== baseurl()) {
|
||||
document.location = baseurl();
|
||||
|
|
Загрузка…
Ссылка в новой задаче