Files
notifications-admin/app/templates/views/letter-jobs.html
Chris Hill-Scott d9da219b7e Use a macro for form tags
This will stop us repeatedly forgetting to add `novalidate` and
`autocomplete='off'` to our forms (which is how most of them are set
up).

It uses sensible defaults, based on how we most-commonly configure
forms:
- most of our forms are `post`ed (but this can be overridden)
- `autocomplete` should only be enabled where it makes sense, otherwise
  it’s more annoying than useful (but this can be overriden)
- we should never be using HTML5 form validation because our own error
  styles and messages are better
2018-09-19 12:43:15 +01:00

53 lines
1.5 KiB
HTML

{% extends "views/platform-admin/_base_template.html" %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% block per_page_title %}
Letter jobs
{% endblock %}
{% block platform_admin_content %}
<h1 class="heading-large">Letter jobs</h1>
{% call form_wrapper() %}
<p>
<table>
<thead>
<tr>
<th>Service name</th>
<th>Job ID</th>
<th>Count</th>
<th>Status</th>
<th colspan="3">Created at</th>
</tr>
</thead>
<tbody>
{% for job in letter_jobs_list %}
<tr>
<td>{{ job.service_name.name }}</td>
<td>{{ job.id }}</td>
<td>{{ job.notification_count }}</td>
<td>{{ job.job_status }}</td>
<td>{{ job.created_at|format_datetime_short }}</td>
<td><input name="job_id" value='{{ job.id }}' type="checkbox"{% if not (job.job_status == 'ready to send' or job.job_status == 'sent to dvla') %} disabled{% endif %}></td>
<td>{{ job.sending }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</p>
{{ page_footer('Send') }}
{% if message %}
<p id='message'>
{{ message }}
{% if message != 'No jobs selected' %}
<div>Refresh page to see status updates</div>
{% endif %}
</p>
{% endif %}
{% endcall %}
{% endblock %}