FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9f15ff7c authored by Dr Catherine Pitt's avatar Dr Catherine Pitt
Browse files

Format form generation form template

This template was becoming difficult to read so has now been indented.
parent 710a0166
No related branches found
No related tags found
No related merge requests found
Pipeline #384109 passed
......@@ -3,104 +3,117 @@
<h1>Chemistry Registration Forms</h1>
<h2>Generate a registration form link</h2>
<form method="POST">
{% if not bulk_tokens|default(False) %}
<p>
Before you generate a link for a new starter please make sure they know:
</p>
<ul>
<li>who their group contact is for any questions they may have, e.g. group secretary</li>
<li>who is going to be undertaking their safety induction</li>
<li>that they have {{ form_lifetime }} days to complete the registration process, including the compulsory safety training and induction, before the link expires</li>
</ul>
{% endif %}
<p>Select the type of form needed and enter the email {% if bulk_tokens|default(False) %}addresses to send them{% else %}address to send it{% endif %} to. Clicking Generate Form will email {% if bulk_tokens|default(False) %}form links to those addresses{% else %}a form link to that address. The link will also be displayed here. If multiple people need to be registered please generate a separate link for each person.{% endif %}</p>
<div class="new-forms-input">
{% if not bulk_tokens|default(False) %}
<p>
Before you generate a link for a new starter please make sure they know:
</p>
<ul>
<li>who their group contact is for any questions they may have, e.g. group secretary</li>
<li>who is going to be undertaking their safety induction</li>
<li>that they have {{ form_lifetime }} days to complete the registration process, including the compulsory
safety training and induction, before the link expires</li>
</ul>
{% endif %}
<p>Select the type of form needed and enter the email {% if bulk_tokens|default(False) %}addresses to send them{%
else %}address to send it{% endif %} to. Clicking Generate Form will email {% if bulk_tokens|default(False)
%}form links to those addresses{% else %}a form link to that address. The link will also be displayed here. If
multiple people need to be registered please generate a separate link for each person.{% endif %}</p>
<div class="new-forms-input">
<div class="form-generation-question">
<div class="form-generation-question">
{{ form.form_type.label }}
{% if form.form_type.errors %}
<span class="error">
{{ form.form_type.errors|join(", ") }}
</span>
{% endif %}
{{ form.form_type.label }}
{% if form.form_type.errors %}
<span class="error">
{{ form.form_type.errors|join(", ") }}
</span>
{% endif %}
{% for type in form.form_type %}
<div class="form-instance">
{{ type }} {{ type.label }}
{% for type in form.form_type %}
<div class="form-instance">
{{ type }} {{ type.label }}
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
<div class="form-generation-question">
{{ form.post_category_id.label }} {{ form.post_category_id }}
{% if form.post_category_id.errors %}
<span class="error">
{{ form.post_category_id.errors|join(", ") }}
</span>
{% endif %}
</div>
<div class="form-generation-question">
{{ form.post_category_id.label }} {{ form.post_category_id }}
{% if form.post_category_id.errors %}
<span class="error">
{{ form.post_category_id.errors|join(", ") }}
</span>
{% endif %}
</div>
<div class="form-generation-question">
{{ form.starter_email.label }} {{ form.starter_email }} {% if form.starter_email.errors %}<span class="error">{{ form.starter_email.errors|join(", ") }}</span>{% endif %}
</div>
<div class="form-generation-question">
{{ form.starter_email.label }} {{ form.starter_email }} {% if form.starter_email.errors %}<span
class="error">{{ form.starter_email.errors|join(", ") }}</span>{% endif %}
</div>
{% if bulk_tokens|default(False) %}
<div class="form-generation-question">
{{ form.send_reminders.label }} {{ form.send_reminders }}
</div>
{% endif %}
{% if bulk_tokens|default(False) %}
<div class="form-generation-question">
{{ form.send_reminders.label }} {{ form.send_reminders }}
</div>
{% endif %}
<input type="submit" name="Generate form" value="Generate form" />
</div>
{% if not safety_handbook_available %}
<div class="error">
<p>
The Safety Handbook is not available to this app instance and so cannot be emailed to the starter. Please make sure your starter has access to a copy some other way, as they will need it in order to complete their registration.
Contact <a href="mailto:support@ch.cam.ac.uk">support@ch.cam.ac.uk</a> to get the app fixed.
</p>
</div>
{% else %}
<input type="submit" name="Generate form" value="Generate form" />
</div>
{% if not safety_handbook_available %}
<div class="error">
<p>
The Safety Handbook is not available to this app instance and so cannot be emailed to the starter. Please
make sure your starter has access to a copy some other way, as they will need it in order to complete their
registration.
Contact <a href="mailto:support@ch.cam.ac.uk">support@ch.cam.ac.uk</a> to get the app fixed.
</p>
</div>
{% else %}
<div>
<p>
This application will email a copy of the Safety Handbook to the new starter if you enter an email address
when generating a form. Alternatively you can download a copy <a
href="{{ url_for('.safety_handbook')}}">here</a> to give to them.
</p>
</div>
{% endif %}
<div>
{{ form.csrf_token }}
</div>
</form>
<div>
{% if bulk_tokens|default(False) and url|default(False) %}
<h2>Links generated</h2>
<p>
This application will email a copy of the Safety Handbook to the new starter if you enter an email address when generating a form. Alternatively you can download a copy <a href="{{ url_for('.safety_handbook')}}">here</a> to give to them.
Unique URLs have been emailed to each person.
{% if failed_emails|length > 0 %}
The following addresses failed: {{ failed_emails|join(',') }}
{% endif %}
</p>
</div>
{% endif %}
<div>
{{ form.csrf_token }}
</div>
</form>
<div>
{% if bulk_tokens|default(False) and url|default(False) %}
<h2>Links generated</h2>
<p>
Unique URLs have been emailed to each person.
{% if failed_emails|length > 0 %}
The following addresses failed: {{ failed_emails|join(',') }}
{% endif %}
</p>
{% endif %}
{% endif %}
{% if not bulk_tokens|default(False) and url|default(False) %}
{% if new_form|default(False) %}
<h2>New form link</h2>
<p>Here is the link to the form you just generated. If you put in an email address for your new starter it has also been emailed to that address; otherwise please pass the link below on to them. You can click on the link yourself to help them start filling it in but only the starter should submit the form. The form state can be saved and returned to later.</p>
<p><a href="{{ url }}">{{ url }}</a></p>
{% else %}
<h2>Link already generated</h2>
<p>
There is already a form in progress for {{ form.starter_email.data }} . An updated link for the form has been emailed to the address, valid for another {{ form_lifetime }} days.
</p>
{% endif %}
<p>You can generate another form above.</p>
{% endif %}
{% if not bulk_tokens|default(False) and url|default(False) %}
{% if new_form|default(False) %}
<h2>New form link</h2>
<p>Here is the link to the form you just generated. If you put in an email address for your new starter it has also
been emailed to that address; otherwise please pass the link below on to them. You can click on the link
yourself to help them start filling it in but only the starter should submit the form. The form state can be
saved and returned to later.</p>
<p><a href="{{ url }}">{{ url }}</a></p>
{% else %}
<h2>Link already generated</h2>
<p>
There is already a form in progress for {{ form.starter_email.data }} . An updated link for the form has been
emailed to the address, valid for another {{ form_lifetime }} days.
</p>
{% endif %}
<p>You can generate another form above.</p>
{% endif %}
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment