mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Show flash messages after ajax request too.
This commit is contained in:
parent
8711f296a4
commit
82761a3454
2 changed files with 5 additions and 1 deletions
|
@ -210,6 +210,10 @@ class AjaxUI {
|
|||
//Replace login menu too (so everything is up to date)
|
||||
$("#login-content").replaceWith($('#login-content', dom));
|
||||
|
||||
//Replace flash messages and show them
|
||||
$("#message-container").replaceWith($('#message-container', dom));
|
||||
$(".toast").toast('show');
|
||||
|
||||
//Set new title
|
||||
let title = extractTitle(responseText);
|
||||
document.title = title;
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
</nav>
|
||||
|
||||
|
||||
<div class="toast-container ">
|
||||
<div class="toast-container" id="message-container">
|
||||
{% for label, messages in app.flashes() %}
|
||||
{% for message in messages %}
|
||||
{% set flash_title = label|replace({'success': 'flash.success', 'error': 'flash.error'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue