handle_ajax_return(): only display success_message if no other message is provided and fix auto-dismiss it
This commit is contained in:
parent
e48d1224f6
commit
075519220b
1 changed files with 3 additions and 2 deletions
|
@ -182,10 +182,11 @@ function handle_ajax_return(
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data && data.success) {
|
if (data && data.success) {
|
||||||
if (success_message) alertify.notify(success_message, "success");
|
if (!(data.messages && data.messages.length) && success_message)
|
||||||
|
alertify.notify(success_message, "success", 5);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!data.errors)
|
if (!(data.errors && data.errors.length))
|
||||||
alertify.notify(
|
alertify.notify(
|
||||||
default_error ??
|
default_error ??
|
||||||
_(
|
_(
|
||||||
|
|
Loading…
Reference in a new issue