You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

71 lines
2.0 KiB

{% 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 }}
<span class="field-heading">{{ upload_form.metadata.label }}</span>
{{ upload_form.metadata }}
<br>
<div class="fields">
<span class="field-heading">{{ upload_form.title.label }}</span>
{{ upload_form.title }}
<span class="field-heading">{{ upload_form.authors.label }}</span>
{{ upload_form.authors }}
<span class="field-heading">{{ upload_form.comments.label }}</span>
{{ upload_form.comments }}
<span class="field-heading">{{ upload_form.timestamp.label }}</span>
{{ upload_form.timestamp }}
<span class="field-heading">{{ upload_form.tags.label }}</span>
{{ 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 %}