Let user supply a note for report

This commit is contained in:
Mouse Reeve
2021-03-11 17:38:21 -08:00
parent 7f45206693
commit 33b8537a3d
9 changed files with 73 additions and 25 deletions

View File

@ -32,11 +32,13 @@
</forM=m>
</div>
<div class="block content">
<h3>{% trans "Reported statuses" %}</h3>
<div class="block">
<h3 class="title is-4">{% trans "Reported statuses" %}</h3>
<ul>
{% for status in report.statuses.all %}
<li>{{ status.id }}</li>
{% for status in report.statuses.select_subclasses.all %}
<li>
{% include 'snippets/status/status.html' with status=status moderation_mode=True %}
</li>
{% endfor %}
</ul>
</div>

View File

@ -0,0 +1,37 @@
{% extends 'components/modal.html' %}
{% load i18n %}
{% load humanize %}
{% block modal-title %}
{% blocktrans with username=user.username %}Report @{{ username }}{% endblocktrans %}
{% endblock %}
{% block modal-form-open %}
<form name="report" method="post" action="{% url 'report' %}">
{% endblock %}
{% block modal-body %}
{% csrf_token %}
<input type="hidden" name="reporter" value="{{ reporter.id }}">
<input type="hidden" name="user" value="{{ user.id }}">
<input type="hidden" name="statuses" value="{{ status.id }}">
<section class="content">
<p>{% blocktrans with site_name=site.name %}This report will be sent to {{ site_name }}'s moderators for review.{% endblocktrans %}</p>
<label class="label" for="id_{{ controls_uid}}_report_note">{% trans "More info about this report:" %}</label>
<textarea class="textarea" name="note" id="id_{{ controls_uid }}_report_note"></textarea>
</section>
{% endblock %}
{% block modal-footer %}
<button class="button is-success" type="submit">{% trans "Submit" %}</button>
{% trans "Cancel" as button_text %}
{% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="report" controls_uid=report_uuid class="" %}
{% endblock %}
{% block modal-form-close %}</form>{% endblock %}

View File

@ -9,7 +9,7 @@
{% block card-content %}
<div class="block">
{% if report.notes %}{{ report.notes }}{% else %}<em>{% trans "No notes provided" %}</em>{% endif %}
{% if report.note %}{{ report.note }}{% else %}<em>{% trans "No notes provided" %}</em>{% endif %}
</div>
{% endblock %}