This commit is contained in:
Aevann1 2021-10-08 06:40:51 +02:00
parent 4a69caec84
commit 65ee7ffbad
2 changed files with 4 additions and 2 deletions

View file

@ -170,7 +170,8 @@ comment_edit=function(id){
} }
post_comment=function(fullname){ post_comment=function(fullname){
document.getElementById('save-reply-to-'+fullname).classList.add('disabled'); const btn = document.getElementById('save-reply-to-'+fullname)
btn.classList.add('disabled');
var form = new FormData(); var form = new FormData();
@ -194,6 +195,7 @@ post_comment=function(fullname){
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error')); var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show(); myToast.show();
document.getElementById("comment-error-text").textContent = "Error. Please try again later."; document.getElementById("comment-error-text").textContent = "Error. Please try again later.";
btn.classList.remove('disabled');
} }
} }
xhr.send(form) xhr.send(form)

View file

@ -33,7 +33,7 @@
{% if v %} {% if v %}
{% include "award_modal.html" %} {% include "award_modal.html" %}
<script src="/assets/js/comments_v.js?v=24"></script> <script src="/assets/js/comments_v.js?v=26"></script>
{% endif %} {% endif %}
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>