Commit d74c2f597ebea551f29aab8542e12a26b844bac2
1 parent
80e13428
Exists in
master
and in
5 other branches
Success message included in update file template [Issue:#455]
Showing
1 changed file
with
2 additions
and
11 deletions
Show diff stats
files/templates/files/update_file.html
@@ -15,16 +15,6 @@ | @@ -15,16 +15,6 @@ | ||
15 | <!-- Card --> | 15 | <!-- Card --> |
16 | <form class="form-horizontal" method="post" id="form-update-file" enctype="multipart/form-data"> | 16 | <form class="form-horizontal" method="post" id="form-update-file" enctype="multipart/form-data"> |
17 | {% csrf_token %} | 17 | {% csrf_token %} |
18 | - {% if messages %} | ||
19 | - {% for message in messages %} | ||
20 | - <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> | ||
21 | - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
22 | - <span aria-hidden="true">×</span> | ||
23 | - </button> | ||
24 | - <p>{{ message }}</p> | ||
25 | - </div> | ||
26 | - {% endfor %} | ||
27 | - {% endif %} | ||
28 | <fieldset> | 18 | <fieldset> |
29 | {% for field in form %} | 19 | {% for field in form %} |
30 | <div class="form-group is-empy{% if form.has_error %} has-error {% endif %} is-fileinput"> | 20 | <div class="form-group is-empy{% if form.has_error %} has-error {% endif %} is-fileinput"> |
@@ -106,6 +96,7 @@ | @@ -106,6 +96,7 @@ | ||
106 | $('#fileUpdateModal').modal('hide'); | 96 | $('#fileUpdateModal').modal('hide'); |
107 | $('#file_edit_{{ file.slug }}').replaceWith(data); | 97 | $('#file_edit_{{ file.slug }}').replaceWith(data); |
108 | $('#file_{{ file.slug }}').replaceWith(data); | 98 | $('#file_{{ file.slug }}').replaceWith(data); |
99 | + alertify.success(" {% trans 'File successfully updated!' %} "); | ||
109 | }, | 100 | }, |
110 | error: function(data){ | 101 | error: function(data){ |
111 | $('.erro-update').html(data.responseText); | 102 | $('.erro-update').html(data.responseText); |
@@ -117,4 +108,4 @@ | @@ -117,4 +108,4 @@ | ||
117 | }); | 108 | }); |
118 | </script> | 109 | </script> |
119 | {% endblock script_file %} | 110 | {% endblock script_file %} |
120 | -<!-- EndModal --> | ||
121 | \ No newline at end of file | 111 | \ No newline at end of file |
112 | +<!-- EndModal --> |