2022-01-11 16:16:08 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-12-17 17:47:57 +01:00
|
|
|
|
2021-12-17 18:35:59 +01:00
|
|
|
{% with messages = get_flashed_messages() %}
|
|
|
|
{% if messages %}
|
|
|
|
<ul class=flashes>
|
|
|
|
{% for message in messages %}
|
|
|
|
<li>{{ message }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
|
2021-12-17 17:47:57 +01:00
|
|
|
{% for field, errors in upload_form.errors.items() %}
|
|
|
|
<div class="error">
|
|
|
|
{{ upload_form[field].label }}: {{ ', '.join(errors) }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
2022-01-11 16:16:08 +01:00
|
|
|
<p class="display-2">
|
|
|
|
{{ petname_message }}
|
2021-12-17 17:33:28 +01:00
|
|
|
</p>
|
2021-12-09 11:38:54 +01:00
|
|
|
|
2022-01-11 16:16:08 +01:00
|
|
|
<p class="intro">Welcome, {{ petname }}. You are anonymous.</p>
|
|
|
|
|
2021-12-09 11:38:54 +01:00
|
|
|
{% if generation_message %}
|
2022-01-11 16:16:08 +01:00
|
|
|
<p class="lead"> {{ generation_message }} </p>
|
2021-12-09 11:38:54 +01:00
|
|
|
{% endif %}
|
2021-12-12 14:59:49 +01:00
|
|
|
<div class="forms">
|
2021-12-17 17:47:57 +01:00
|
|
|
<form class="metafields" method="POST" action="/upload" enctype="multipart/form-data">
|
2021-12-12 14:59:49 +01:00
|
|
|
{{ upload_form.csrf_token }}
|
|
|
|
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.metadata.label }}</h6>
|
2021-12-12 14:59:49 +01:00
|
|
|
{{ upload_form.metadata }}
|
2022-01-11 16:16:08 +01:00
|
|
|
<br>
|
|
|
|
<div class="fields">
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.title.label }}</h6>
|
2022-01-11 16:16:08 +01:00
|
|
|
{{ upload_form.title }}
|
2021-12-12 14:59:49 +01:00
|
|
|
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.authors.label }}</h6>
|
2022-01-11 16:16:08 +01:00
|
|
|
{{ upload_form.authors }}
|
2021-12-12 14:59:49 +01:00
|
|
|
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.comments.label }}</h6>
|
2022-01-11 16:16:08 +01:00
|
|
|
{{ upload_form.comments }}
|
2021-12-12 14:59:49 +01:00
|
|
|
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.timestamp.label }}</h6>
|
2022-01-11 16:16:08 +01:00
|
|
|
{{ upload_form.timestamp }}
|
2021-12-12 14:59:49 +01:00
|
|
|
|
2022-01-12 13:51:11 +01:00
|
|
|
<h6>{{ upload_form.tags.label }}</h6>
|
2022-01-11 16:16:08 +01:00
|
|
|
{{ upload_form.tags }}
|
|
|
|
</div>
|
2021-12-17 17:33:28 +01:00
|
|
|
<input
|
|
|
|
type="hidden"
|
|
|
|
id="petname"
|
|
|
|
name="petname"
|
|
|
|
value="{{ petname }}"
|
|
|
|
/>
|
2021-12-12 14:59:49 +01:00
|
|
|
|
2022-01-11 16:38:30 +01:00
|
|
|
<input id="generate" type="submit" value="generate" />
|
2021-12-12 14:59:49 +01:00
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
2021-12-17 17:47:57 +01:00
|
|
|
|
2021-12-17 17:33:28 +01:00
|
|
|
<div class="iframe">
|
2021-12-12 14:59:49 +01:00
|
|
|
<object data="{{ pdf }}" type="application/pdf">
|
|
|
|
<iframe src="{{ pdf }}"></iframe>
|
|
|
|
</object>
|
|
|
|
</div>
|
2022-01-11 16:16:08 +01:00
|
|
|
|
|
|
|
{% endblock %}
|