mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Add letter upload form which redirects to blank preview page
Added a form to upload a single letter. Currently this only uses the form to validate that a file is submitted and that the file is a PDF. If either of these validations fail, the form will display an error. Otherwise, we redirect to a new preview page which just has the filename as the heading for now.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/file-upload.html" import file_upload %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Upload a letter
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<div class="grid-row">
|
||||
<div class="column-five-sixths">
|
||||
{{ page_header(
|
||||
'Upload a letter',
|
||||
back_link=url_for('main.uploads', service_id=current_service.id)
|
||||
) }}
|
||||
|
||||
<p>
|
||||
{{ file_upload(
|
||||
form.file,
|
||||
action = url_for('main.upload_letter', service_id=current_service.id),
|
||||
)}}
|
||||
</p>
|
||||
<p>You can upload a single letter as a PDF.</p>
|
||||
<p>Your file must meet our <a href="https://docs.notifications.service.gov.uk/documentation/images/notify-pdf-letter-spec-v2.3.pdf">letter specification</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -7,10 +7,12 @@
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<div class="column-five-sixths">
|
||||
{{ page_header('Uploads') }}
|
||||
|
||||
<p>Upload a letter and Notify will print, pack and post it for you.</p>
|
||||
|
||||
<a href="{{ url_for('.upload_letter', service_id=current_service.id) }}" class="button-secondary">Upload a letter</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ original_filename }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
{{ page_header(
|
||||
original_filename,
|
||||
back_link=url_for('main.upload_letter', service_id=current_service.id)
|
||||
) }}
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user