This commit is contained in:
Aevann1 2022-02-01 08:27:48 +02:00
parent 80e5c77d0a
commit 0a99d8122a
4 changed files with 10 additions and 4 deletions

View file

@ -55,6 +55,9 @@ function report_commentModal(id, author) {
btn.innerHTML='Report comment';
btn.disabled = false;
reason = document.getElementById("reason-comment")
reason.value = ""
btn.onclick = function() {
this.innerHTML='Reporting comment';
this.disabled = true;
@ -63,7 +66,7 @@ function report_commentModal(id, author) {
xhr.setRequestHeader('xhr', 'xhr');
var form = new FormData()
form.append("formkey", formkey());
form.append("reason", document.getElementById("reason-comment").value);
form.append("reason", reason.value);
xhr.onload=function() {
document.getElementById("reportCommentFormBefore").classList.add('d-none');

View file

@ -6,6 +6,9 @@ function report_postModal(id) {
submitbutton.disabled = false;
submitbutton.innerHTML='Report post';
reason = document.getElementById("reason")
reason.value = ""
submitbutton.onclick = function() {
this.innerHTML='Reporting post';
@ -16,7 +19,7 @@ function report_postModal(id) {
xhr.setRequestHeader('xhr', 'xhr');
var form = new FormData()
form.append("formkey", formkey());
form.append("reason", document.getElementById("reason").value);
form.append("reason", reason.value);
xhr.onload=function() {
document.getElementById("reportPostFormBefore").classList.add('d-none');

View file

@ -904,7 +904,7 @@
{% if v %}
<script src="/static/assets/js/marked.js?a=220"></script>
<script src="/static/assets/js/comments_v.js?a=238"></script>
<script src="/static/assets/js/comments_v.js?a=239"></script>
{% endif %}
<script src="/static/assets/js/clipboard.js?a=220"></script>

View file

@ -32,4 +32,4 @@
</div>
</div>
<script src="/static/assets/js/report_post_modal.js?a=223"></script>
<script src="/static/assets/js/report_post_modal.js?a=224"></script>