fix removing post reports

pull/150/head
Aevann 2023-05-16 03:01:53 +03:00
parent 3526ae93a1
commit c4b246d3ac
4 changed files with 11 additions and 21 deletions

View File

@ -47,13 +47,3 @@ function approveComment(t,comment_id,button1,button2,cls) {
}
);
}
function delReportComment(t, url) {
postToast(t, url,
{
},
() => {
t.parentElement.remove()
}
);
}

View File

@ -7,3 +7,13 @@ function unchud_or_unban(t, url) {
t.nextElementSibling.classList.remove('d-none');
});
}
function delReport(t, url) {
postToast(t, url,
{
},
() => {
t.parentElement.remove()
}
);
}

View File

@ -40,13 +40,3 @@ function approvePost(t,post_id,button1,button2,cls) {
}
);
}
function delReportPost(t, url) {
postToast(t, url,
{
},
() => {
t.parentElement.remove()
}
);
}

View File

@ -210,7 +210,7 @@
<a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>
{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %}
{% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}
<button type="button" data-nonce="{{g.nonce}}" data-onclick="delReportComment(this,'/del_report/comment/{{f.comment_id}}/{{f.user_id}}')">[remove]</button>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="delReport(this,'/del_report/comment/{{f.comment_id}}/{{f.user_id}}')">[remove]</button>
{% endif %}
</li>
{% endfor %}