fix removing post reports
parent
3526ae93a1
commit
c4b246d3ac
|
@ -47,13 +47,3 @@ function approveComment(t,comment_id,button1,button2,cls) {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
function delReportComment(t, url) {
|
||||
postToast(t, url,
|
||||
{
|
||||
},
|
||||
() => {
|
||||
t.parentElement.remove()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,13 +40,3 @@ function approvePost(t,post_id,button1,button2,cls) {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
function delReportPost(t, url) {
|
||||
postToast(t, url,
|
||||
{
|
||||
},
|
||||
() => {
|
||||
t.parentElement.remove()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue