temporary-indexing-app/templates/index.html
2022-01-12 13:51:11 +01:00

71 lines
1.8 KiB
HTML

{% extends 'base.html' %}
{% block content %}
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class=flashes>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
{% for field, errors in upload_form.errors.items() %}
<div class="error">
{{ upload_form[field].label }}: {{ ', '.join(errors) }}
</div>
{% endfor %}
<p class="display-2">
{{ petname_message }}
</p>
<p class="intro">Welcome, {{ petname }}. You are anonymous.</p>
{% if generation_message %}
<p class="lead"> {{ generation_message }} </p>
{% endif %}
<div class="forms">
<form class="metafields" method="POST" action="/upload" enctype="multipart/form-data">
{{ upload_form.csrf_token }}
<h6>{{ upload_form.metadata.label }}</h6>
{{ upload_form.metadata }}
<br>
<div class="fields">
<h6>{{ upload_form.title.label }}</h6>
{{ upload_form.title }}
<h6>{{ upload_form.authors.label }}</h6>
{{ upload_form.authors }}
<h6>{{ upload_form.comments.label }}</h6>
{{ upload_form.comments }}
<h6>{{ upload_form.timestamp.label }}</h6>
{{ upload_form.timestamp }}
<h6>{{ upload_form.tags.label }}</h6>
{{ upload_form.tags }}
</div>
<input
type="hidden"
id="petname"
name="petname"
value="{{ petname }}"
/>
<input id="generate" type="submit" value="generate" />
</form>
</div>
<div class="iframe">
<object data="{{ pdf }}" type="application/pdf">
<iframe src="{{ pdf }}"></iframe>
</object>
</div>
{% endblock %}