Update report closure reasons to improve clarity

This commit is contained in:
rubenwardy
2025-09-10 15:07:58 +01:00
parent 864add055b
commit 4c78e098cf
2 changed files with 8 additions and 8 deletions

View File

@@ -141,11 +141,11 @@ def view(rid: str):
db.session.commit()
else:
if "completed" in request.form:
outcome = "completed"
outcome = "as completed"
elif "removed" in request.form:
outcome = "content removed"
outcome = "as content removed"
elif "invalid" in request.form:
outcome = "invalid"
outcome = "without action"
if report.thread:
flash("Make sure to comment why the report is invalid in the thread", "warning")
else:
@@ -153,10 +153,10 @@ def view(rid: str):
report.is_resolved = True
url = url_for("report.view", rid=report.id)
add_audit_log(AuditSeverity.MODERATION, current_user, f"Resolved report as {outcome} \"{report.title}\"", url)
add_audit_log(AuditSeverity.MODERATION, current_user, f"Report closed {outcome} \"{report.title}\"", url)
if report.thread:
add_replies(report.thread, current_user, f"Report closed as {outcome}", is_status_update=True)
add_replies(report.thread, current_user, f"Closed report {outcome}", is_status_update=True)
db.session.commit()

View File

@@ -91,13 +91,13 @@
<article>
<h2>{% if report.is_resolved %}Reopen report{% else %}Close report{% endif %}</h2>
<form method="POST" action="">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
{% if report.is_resolved %}
<button type="submit" class="btn bg-primary" name="reopen" value="true">{{ _("Reopen") }}</button>
{% else %}
<button type="submit" class="btn bg-primary" name="completed" value="true">{{ _("Completed / resolved") }}</button>
<button type="submit" class="btn bg-primary" name="completed" value="true">{{ _("Completed (action taken)") }}</button>
<button type="submit" class="btn bg-primary" name="removed" value="true">{{ _("Content removed") }}</button>
<button type="submit" class="btn bg-primary" name="invalid" value="true">{{ _("Invalid") }}</button>
<button type="submit" class="btn bg-primary" name="invalid" value="true">{{ _("Invalid / close with no action") }}</button>
{% endif %}
</form>
</article>