Merge pull request #2718 from alphagov/sticky-footer-new-buttons

Add sticky footer on letter contact details, fix issues
This commit is contained in:
Chris Hill-Scott
2019-02-01 16:11:28 +00:00
committed by GitHub
4 changed files with 41 additions and 36 deletions

View File

@@ -50,6 +50,10 @@
$component.html(states.keyVisible(key, thing))
);
if ('stickAtBottomWhenScrolling' in GOVUK) {
GOVUK.stickAtBottomWhenScrolling.recalculate();
}
};
};

View File

@@ -11,16 +11,9 @@
{% block maincolumn_content %}
<div class="grid-row bottom-gutter">
<div class="column-two-thirds">
<h1 class="heading-large">
Team members
</h1>
</div>
<div class="column-one-third">
<a href="{{ url_for('.invite_org_user', org_id=current_org.id) }}" class="button align-with-heading">Invite team member</a>
</div>
</div>
<h1 class="heading-large">
Team members
</h1>
{% if show_search_box %}
<div data-module="autofocus">
@@ -58,6 +51,8 @@
{% endfor %}
</div>
<div class="js-stick-at-bottom-when-scrolling">
<a href="{{ url_for('.invite_org_user', org_id=current_org.id) }}" class="button">Invite team member</a>
</div>
{% endblock %}

View File

@@ -15,11 +15,6 @@
Sender addresses
</h1>
</div>
{% if current_user.has_permissions('manage_service') %}
<div class="column-one-third">
<a href="{{ url_for('.service_add_letter_contact', service_id=current_service.id) }}" class="button align-with-heading">Add a new address</a>
</div>
{% endif %}
</div>
<div class="user-list">
{% if not letter_contact_details %}
@@ -46,4 +41,13 @@
</div>
{% endfor %}
</div>
{% if current_user.has_permissions('manage_service') %}
<div class="grid-row">
<div class="column-whole">
<div class="js-stick-at-bottom-when-scrolling">
<a href="{{ url_for('.service_add_letter_contact', service_id=current_service.id) }}" class="button">Add a new address</a>
</div>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -14,26 +14,28 @@
Add a new address
</h1>
<div class="grid-row">
{% call form_wrapper() %}
{{ textbox(
form.letter_contact_block,
label='This will appear as the sender address on your letters.'|safe,
hint='10 lines maximum',
width='1-1',
rows=10,
highlight_tags=True
<div class="column-whole">
{% call form_wrapper() %}
{{ textbox(
form.letter_contact_block,
label='This will appear as the sender address on your letters.'|safe,
hint='10 lines maximum',
width='1-2',
rows=10,
highlight_tags=True
) }}
{% if not first_contact_block %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{% endif %}
{{ page_footer(
'Add',
back_link=None if request.args.get('from_template') else url_for('.service_letter_contact_details', service_id=current_service.id),
back_link_text='Back'
) }}
{% if not first_contact_block %}
<div class="form-group">
{{ checkbox(form.is_default) }}
</div>
{% endif %}
{{ page_footer(
'Add',
back_link=None if request.args.get('from_template') else url_for('.service_letter_contact_details', service_id=current_service.id),
back_link_text='Back'
) }}
{% endcall %}
{% endcall %}
</div>
</div>
{% endblock %}