mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 11:08:24 -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.
54 lines
1.7 KiB
HTML
54 lines
1.7 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner_wrapper %}
|
||
{% from "components/textbox.html" import textbox %}
|
||
{% from "components/checkbox.html" import checkbox %}
|
||
{% from "components/page-header.html" import page_header %}
|
||
{% from "components/page-footer.html" import page_footer %}
|
||
{% from "components/form.html" import form_wrapper %}
|
||
|
||
{% block service_page_title %}
|
||
Edit text message sender
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
{{ page_header(
|
||
'Edit text message sender',
|
||
back_link=None if request.args.get('from_template') else url_for('.service_sms_senders', service_id=current_service.id)
|
||
) }}
|
||
{% call form_wrapper() %}
|
||
{% if inbound_number %}
|
||
<p>
|
||
<span class="bottom-gutter-1-3"> {{ sms_sender.sms_sender }} </span>
|
||
<span class="hint"> This phone number receives replies and can’t be changed </span>
|
||
</p>
|
||
{% else %}
|
||
{{ textbox(
|
||
form.sms_sender,
|
||
width='1-4',
|
||
hint='Up to 11 characters, letters, numbers and spaces only'
|
||
) }}
|
||
{% endif %}
|
||
{% if form.is_default.data %}
|
||
<p class="form-group">
|
||
This is the default text message sender
|
||
</p>
|
||
{{ page_footer('Save') }}
|
||
{% else %}
|
||
<div class="form-group">
|
||
{{ checkbox(form.is_default) }}
|
||
</div>
|
||
{% if inbound_number %}
|
||
{{ page_footer('Save') }}
|
||
{% else %}
|
||
{{ page_footer(
|
||
'Save',
|
||
delete_link=url_for('.service_confirm_delete_sms_sender', service_id=current_service.id, sms_sender_id=sms_sender_id),
|
||
delete_link_text='Delete'
|
||
) }}
|
||
{% endif %}
|
||
{% endif %}
|
||
{% endcall %}
|
||
|
||
{% endblock %}
|