0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Issue #6064 --> added the code to documents view (edited multiple/add.html and add-multiple.js) to create success message (#6427)

This commit is contained in:
Glenn Paquette 2020-10-13 13:24:01 -04:00 committed by GitHub
parent 7e74b2b5d9
commit 423aefc72c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,8 @@ $(function() {
$.post(this.action, form.serialize(), function(data) {
if (data.success) {
var statusText = $('.status-msg.update-success').text();
addMessage('success', statusText);
itemElement.slideUp(function() {$(this).remove()});
} else {
form.replaceWith(data.form);

View File

@ -69,6 +69,7 @@
<div class="right col9">
<p class="status-msg success">{% trans "Upload successful. Please update this document with a more appropriate title, if necessary. You may also delete the document completely if the upload wasn't required." %}</p>
<p class="status-msg failure">{% trans "Sorry, upload failed." %}</p>
<p class="status-msg update-success">{% trans "Document updated." %}</p>
<p class="status-msg failure error_messages"></p>
</div>
</li>