This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
/
attachment.html
84 lines (74 loc) · 3.39 KB
/
attachment.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{% extends "layout.html" %}
{% block page_title %}Add attachment{% endblock %}
{% block content %}
{% if data['attachment-count'] %}
{% set attachment_count = (data['attachment-count'] | int) + 1 %}
{% else %}
{% set attachment_count = 1 %}
{% endif %}
{% if attachmentId %}
{% set editing = true %}
{% set attachment_id = attachmentId %}
{% else %}
{% set attachment_id = attachment_count %}
{% endif %}
<a href="/document-tasks" class="govuk-c-back-link">Back</a>
<main role="main" class="govuk-o-main-wrapper">
<form action="/attachment-done" method="post" class="form" data-module="fake-filename-from-title">
<div class="govuk-o-grid">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<h1 class="form-title govuk-heading-xl">
<span class="govuk-caption-xl">{{ data['title'] }}</span>
Add attachment
</h1>
<div class="govuk-prose-scope">
<p>You must upload attachments in an <a href="https://www.gov.uk/guidance/content-design/planning-content#open-formats">open standards</a> format.</p>
<!-- <ul>
<li>.odt (OpenDocument Text) for text documents</li>
<li>.ods (OpenDocument Spreadsheet) for spreadsheets</li>
<li>.odp (OpenDocument Presentation) for presentation slides</li>
<li>.csv (Comma-separated values) for datasets designed to be machine-readable</li>
<li>PDF/A for .pdf files to be archivable and accessible</li>
</ul>
<p>Most publishing software will allow you to select an open format from the Save As or Download menu.</p>
<p>Do not used closed formats like .docx or .xlsx.</p> -->
</div>
</div>
</div>
<div class="govuk-o-grid" data-module="live-content-check">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 is-input">
<label class="govuk-c-label govuk-c-label--bold" for="attachment-title">
Attachment title
<span class="govuk-c-label__hint">Use the official title of the document</span>
</label>
<input required type="text" name="{{ attachment_id }}-attachment-title" class="js-check-content govuk-c-input" id="attachment-title" data-target="attachment-title-checks" value="{% if editing %}{{data[attachment_id + '-attachment-title']}}{% endif %}">
<input type="hidden" name="{{ attachment_id }}-attachment-filename" class="js-dynamic-filename" value="{% if editing %}{{data[attachment_id + '-attachment-filename']}}{% endif %}">
{% if editing %}
{% else %}
<input type="hidden" name="attachment-count" value="{{ attachment_count }}">
{% endif %}
</div>
</div>
</div>
<div class="govuk-o-grid">
<div class="govuk-o-grid__item govuk-o-grid__item--two-thirds">
<div class="govuk-!-mb-r6 is-input">
<label class="govuk-c-label govuk-c-label--bold" for="attachment-file">
File
</label>
<input type="file" name="attachment-file" class="govuk-c-file-upload">
</div>
</div>
</div>
<div class="govuk-!-mb-r6">
<input type="submit" class="govuk-c-button" value="Save">
</div>
{% if editing %}
<div class="govuk-!-mb-r6">
<a href="/document-tasks" class="button button-link">Discard changes</a>
</div>
{% endif %}
</form>
</main>
{% endblock %}