99 lines
4.9 KiB
HTML
99 lines
4.9 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_calendar_links.html" import confirmed_dates with context %}
|
|
{% block title %}{% if form %}{{ form.title }} · {% endif %}{{ appearance.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="card narrow">
|
|
{% if invalid_document %}
|
|
<h1>{{ _('Document') }}</h1>
|
|
<p class="alert error" role="alert">{{ _('This download link is not valid or has expired. Download links in follow-up emails are valid for a limited time.') }}</p>
|
|
{% elif invalid %}
|
|
<h1>{{ _('Personal link') }}</h1>
|
|
<p class="alert error" role="alert">{{ _('This link is not valid. It may have been replaced by a newer one, or the answer has been deleted.') }}</p>
|
|
<p><a href="/links">{{ _('Request my links again') }}</a></p>
|
|
{% elif deleted %}
|
|
<h1>{{ form.title }}</h1>
|
|
<p class="alert info" role="status">{{ _('Your answer has been deleted.') }}</p>
|
|
{% else %}
|
|
<h1>{{ form.title }}</h1>
|
|
{% if saved %}<p class="alert ok" role="status">{{ _('Your changes have been saved.') }}</p>{% endif %}
|
|
{% if notify_changed %}<p class="alert ok" role="status">{{ _('Your notification setting has been saved.') }}</p>{% endif %}
|
|
<p class="hint">{{ _('Your answer from %(date)s.', date=own.submitted_at | datetime) }}{% if own.updated_at %} {{ _('Last changed %(date)s.', date=own.updated_at | datetime) }}{% endif %}</p>
|
|
{% for q in waiting %}
|
|
<p class="alert info">{{ _('You are on the waiting list for “%(entry)s”. If a place becomes free, you move up automatically.', entry=q.label) }}</p>
|
|
{% endfor %}
|
|
<dl class="answers">
|
|
{% for q, text, files in rows %}
|
|
<dt>{{ q.label }}</dt>
|
|
<dd>{% if files %}{% for f in files %}{{ f.name }} <span class="hint">({{ f.size | filesize }})</span>{% if not loop.last %}, {% endif %}{% endfor %}{% else %}{{ text or '—' }}{% endif %}</dd>
|
|
{% endfor %}
|
|
</dl>
|
|
{% if documents %}
|
|
<h2>{{ _('Documents') }}</h2>
|
|
<ul class="plain-list">
|
|
{% for doc, media in documents %}
|
|
<li><a href="/r/{{ token }}/documents/{{ doc.public_id }}">{{ doc.title }}</a> <span class="hint">({{ media.size | filesize }})</span></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{{ confirmed_dates(confirmed or [], calendar_url or '', feed_url or '') }}
|
|
{% if results_url %}
|
|
<p><a class="button secondary" href="{{ results_url }}">{{ _('Show results') }}</a></p>
|
|
{% endif %}
|
|
{% if can_edit %}
|
|
<p><a class="button secondary" href="/r/{{ token }}/edit">{{ _('Change my answer') }}</a></p>
|
|
{% elif open %}
|
|
<p class="hint">{{ _('This form does not allow changing answers.') }}</p>
|
|
{% else %}
|
|
<p class="hint">{{ _('The form is closed; the answer can no longer be changed.') }}</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
</section>
|
|
|
|
{% if not invalid and not deleted and not invalid_document %}
|
|
{% if contact %}
|
|
<section class="card narrow">
|
|
<h2>{{ _('Notifications') }}</h2>
|
|
{% if contact.confirmed_at %}
|
|
<form method="post" action="/r/{{ token }}/notify" class="form">
|
|
{{ csrf_field(request) }}
|
|
<label class="check"><input type="checkbox" name="enabled" {% if contact.notify %}checked{% endif %}> {{ _('Notify me by email, for example when I move up from a waiting list or a date is confirmed') }}</label>
|
|
<button type="submit" class="secondary">{{ _('Save') }}</button>
|
|
</form>
|
|
{% else %}
|
|
<p>{{ _('Your email address is not confirmed yet. Use the link in the confirmation email to receive notifications.') }}</p>
|
|
{% endif %}
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% if can_register %}
|
|
<section class="card narrow">
|
|
<h2>{{ _('Create an account') }}</h2>
|
|
<p>{{ _('With an account you see all your participations in one place and no longer need individual links. Your earlier answers with this address move to the account.') }}</p>
|
|
<p><a class="button secondary" href="/register?email={{ contact.email | urlencode }}">{{ _('Create an account') }}</a></p>
|
|
</section>
|
|
{% endif %}
|
|
|
|
<section class="card narrow">
|
|
<h2>{{ _('Download my answer') }}</h2>
|
|
<p>{{ _('This answer with places as a JSON file, for your records or for another program.') }}</p>
|
|
<form method="post" action="/r/{{ token }}/export">
|
|
{{ csrf_field(request) }}
|
|
<button type="submit" class="secondary">{{ _('Download') }}</button>
|
|
</form>
|
|
</section>
|
|
|
|
{% if can_edit %}
|
|
<section class="card narrow">
|
|
<h2>{{ _('Delete my answer') }}</h2>
|
|
{% if delete_error %}<p class="alert error" role="alert">{{ _('Please confirm the deletion.') }}</p>{% endif %}
|
|
<form method="post" action="/r/{{ token }}/delete" class="form">
|
|
{{ csrf_field(request) }}
|
|
<label class="check"><input type="checkbox" name="confirm" required> {{ _('Delete my answer completely, including booked places') }}</label>
|
|
<button type="submit" class="danger">{{ _('Delete my answer') }}</button>
|
|
</form>
|
|
</section>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endblock %}
|