forked from MarseyWorld/MarseyWorld
remove report with js
parent
d649801cc7
commit
0825c3776e
|
@ -47,3 +47,13 @@ function approveComment(t,comment_id,button1,button2,cls) {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
function delReportComment(t, url) {
|
||||
postToast(t, url,
|
||||
{
|
||||
},
|
||||
() => {
|
||||
t.parentElement.remove()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -40,3 +40,13 @@ function approvePost(t,post_id,button1,button2,cls) {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
function delReportPost(t, url) {
|
||||
postToast(t, url,
|
||||
{
|
||||
},
|
||||
() => {
|
||||
t.parentElement.remove()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
<ul class="mt-1 mb-0" style="padding-left:20px;word-wrap:break-word">
|
||||
{% for f in c.filtered_flags(v) %}
|
||||
<li>{% if c.ghost %}👻{% else %}<a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% endif %}{% 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="postToastSwitch(this,'/del_report/comment/{{f.comment_id}}/{{f.user_id}}')">[remove]</button>{% endif %}</li>
|
||||
<li>{% if c.ghost %}👻{% else %}<a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>{% endif %}{% 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>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
<ul class="mt-1 mb-0" style="padding-left:20px; word-wrap:break-word">
|
||||
{% for f in p.filtered_flags(v) %}
|
||||
<li><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="postToastSwitch(this,'/del_report/post/{{f.post_id}}/{{f.user_id}}')">[remove]</button>{% endif %}</li>
|
||||
<li><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="delReportPost(this,'/del_report/post/{{f.post_id}}/{{f.user_id}}')">[remove]</button>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||
<ul class="mt-1 mb-0" style="padding-left:20px; word-wrap:break-word">
|
||||
{% for f in p.filtered_flags(v) %}
|
||||
<li><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="postToastSwitch(this,'/del_report/post/{{f.post_id}}/{{f.user_id}}')">[remove]</button>{% endif %}</li>
|
||||
<li><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="delReportPost(this,'/del_report/post/{{f.post_id}}/{{f.user_id}}')">[remove]</button>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue