mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
The Design System has standardised on back links being at the top of the page, decorated with a small text-coloured arrow. I think this makes more sense than having them at the bottom, because it suggests, in some way, being able to go back before commiting to any of the forms on the page. Whereas the things at the bottom of the page should be performing actions on what’s in the page. The reason for making this change now is that it de-clutters the area around the green buttons. This was presenting a design challenge where multiple levels of interaction were happening in the same form. Moving these back links to the top of the page should mean that, in these complicated forms, there’s one fewer thing to compete for the user’s attention. I’ve componentised this into a `page_header` macro so that the change is easier to roll out and maintain.
70 lines
2.3 KiB
HTML
70 lines
2.3 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner_wrapper %}
|
||
{% from "components/page-header.html" import page_header %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/table.html" import list_table, text_field, index_field, index_field_heading %}
|
||
{% from "components/list.html" import list_of_placeholders %}
|
||
{% from "components/form.html" import form_wrapper %}
|
||
|
||
{% block service_page_title %}
|
||
Confirm changes
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
{{ page_header(
|
||
'Confirm changes',
|
||
back_link=url_for(".edit_service_template", service_id=current_service.id, template_id=new_template.id)
|
||
) }}
|
||
|
||
<div class="bottom-gutter">
|
||
{% if template_change.placeholders_removed %}
|
||
<p>
|
||
You removed {{ list_of_placeholders(template_change.placeholders_removed) }}
|
||
</p>
|
||
{% endif %}
|
||
{% if template_change.placeholders_added %}
|
||
<p>
|
||
You added {{ list_of_placeholders(template_change.placeholders_added) }}
|
||
</p>
|
||
{% endif %}
|
||
</div>
|
||
|
||
{% call form_wrapper() %}
|
||
<input type="hidden" name="name" value="{{ new_template.name }}" />
|
||
<input type="hidden" name="subject" value="{{ new_template._subject or '' }}" />
|
||
<input type="hidden" name="template_content" value="{{ new_template.content }}" />
|
||
<input type="hidden" name="template_id" value="{{ new_template.id }}" />
|
||
|
||
<input type="hidden" name="confirm" value="true" />
|
||
{{ page_footer('Save changes to template') }}
|
||
{% endcall %}
|
||
|
||
<p>
|
||
When you send messages using this template you’ll need
|
||
{{ column_headings|length }}
|
||
column{{ 's' if column_headings|length > 1 else '' }} of data:
|
||
</p>
|
||
|
||
<div class="spreadsheet fullscreen-content" data-module="fullscreen-table"">
|
||
{% call(item, row_number) list_table(
|
||
example_rows,
|
||
caption="Example",
|
||
caption_visible=False,
|
||
field_headings=[''] + column_headings
|
||
) %}
|
||
{% if 1 == row_number %}
|
||
{{ index_field('') }}
|
||
{% else %}
|
||
{{ index_field(row_number - 1) }}
|
||
{% endif %}
|
||
{% for column in item %}
|
||
{{ text_field(column) }}
|
||
{% endfor %}
|
||
{% endcall %}
|
||
</div>
|
||
|
||
<p class="top-gutter">Developers, you’ll need to update your API calls</p>
|
||
|
||
{% endblock %}
|