mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 05:08:25 -04:00
The page_header macro includes an optional back link. Since the page_header is always used inside `<main>`, where the back link should not be, this stops setting the back link in the page header and instead sets it in the new `backLink` block.
47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/file-upload.html" import file_upload %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
{% from "components/back-link/macro.njk" import govukBackLink %}
|
|
|
|
{% block service_page_title %}
|
|
{{ '{} email branding'.format('Update' if email_branding else 'Create')}}
|
|
{% endblock %}
|
|
|
|
|
|
{% block backLink %}
|
|
{{ govukBackLink({ "href": url_for('.email_branding') }) }}
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
{{ page_header('{} email branding'.format('Update' if email_branding else 'Add')) }}
|
|
<div class="govuk-grid-row">
|
|
<div class="govuk-grid-column-three-quarters">
|
|
{% if logo %}
|
|
<div id="logo-img">
|
|
<img src="https://{{ cdn_url }}/{{ logo }}"/>
|
|
</div>
|
|
{% endif %}
|
|
<p class="govuk-body">
|
|
Logos should be PNG files, 108px high
|
|
</p>
|
|
{{ file_upload(form.file, allowed_file_extensions=['png'], button_text='{} logo'.format('Update' if email_branding else 'Upload')) }}
|
|
{% call form_wrapper() %}
|
|
<div class="form-group">
|
|
<div style='margin-top:15px;'>{{form.name}}</div>
|
|
<div style='margin-top:15px;'>{{form.text}}</div>
|
|
{{ form.colour }}
|
|
{{ form.brand_type }}
|
|
{{ page_footer(
|
|
'Save',
|
|
button_name='operation',
|
|
button_value='email-branding-details'
|
|
) }}
|
|
</div>
|
|
{% endcall %}
|
|
</div>
|
|
|
|
{% endblock %}
|