Add report attachments

This commit is contained in:
rubenwardy
2025-09-01 18:16:42 +01:00
parent 30aecb8565
commit e44a5545a3
11 changed files with 79 additions and 14 deletions

View File

@@ -52,7 +52,7 @@
pattern="[A-Za-z0-9/._-]+") }}
{% endif %}
{{ render_field(form.file_upload, fieldclass="form-control-file", class_="mt-3", accept=".zip") }}
{{ render_field(form.file_upload, class_="mt-3", accept=".zip") }}
<p>
{{ _("Take a look at the <a href='/help/package_config/'>Package Configuration and Releases Guide</a> for

View File

@@ -16,7 +16,7 @@
{{ form.hidden_tag() }}
{{ render_field(form.title) }}
{{ render_field(form.file_upload, fieldclass="form-control-file", accept="image/png,image/jpeg,image/webp") }}
{{ render_field(form.file_upload, accept="image/png,image/jpeg,image/webp") }}
{{ render_submit_field(form.submit) }}
</form>
{% endblock %}

View File

@@ -12,7 +12,7 @@
{{ form.hidden_tag() }}
{{ render_field(form.title) }}
{{ render_field(form.file_upload, fieldclass="form-control-file", accept="image/png,image/jpeg,image/webp") }}
{{ render_field(form.file_upload, accept="image/png,image/jpeg,image/webp") }}
{{ render_checkbox_field
{{ render_submit_field(form.submit) }}
</form>

View File

@@ -38,6 +38,7 @@
{{ render_field(form.url) }}
{{ render_field(form.title) }}
{{ render_field(form.message, class_="m-0", fieldclass="form-control markdown", data_enter_submit="1") }}
{{ render_field(form.file_upload, accept="image/png,image/jpeg,image/webp", hint=_("Optional, usually not required")) }}
{{ render_submit_field(form.submit) }}
<p class="alert alert-info mt-5">
{{ _("Found a bug? Please report on the package's issue tracker or in a thread instead.") }}

View File

@@ -77,6 +77,17 @@
</aside>
</article>
{% if report.attachments %}
<article>
<h2>Attachments</h2>
<ul>
{% for attachment in report.attachments %}
<li><a href="{{ attachment.url }}">{{ attachment.url }}</a></li>
{% endfor %}
</ul>
</article>
{% endif %}
<article>
<h2>{% if report.is_resolved %}Reopen report{% else %}Close report{% endif %}</h2>
<form method="POST" action="">