mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Update call to api_key component across pages
Includes the following pages: - letter contact (in service settings) - sms-senders page (in service settings) - email reply-to (in service settings) - API key page Note: the call on the letter contact page uses the first line of the contact address as the unique identifier for each button.
This commit is contained in:
@@ -807,6 +807,7 @@ def add_template_filters(application):
|
|||||||
format_notification_status_as_url,
|
format_notification_status_as_url,
|
||||||
format_number_in_pounds_as_currency,
|
format_number_in_pounds_as_currency,
|
||||||
formatters.formatted_list,
|
formatters.formatted_list,
|
||||||
|
formatters.normalise_lines,
|
||||||
nl2br,
|
nl2br,
|
||||||
format_phone_number_human_readable,
|
format_phone_number_human_readable,
|
||||||
format_thousands,
|
format_thousands,
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
|
|
||||||
{{ api_key(
|
{{ api_key(
|
||||||
'{}-{}-{}'.format(key_name, service_id, secret),
|
'{}-{}-{}'.format(key_name, service_id, secret),
|
||||||
'API key'
|
name='API key',
|
||||||
|
thing='API key'
|
||||||
) }}
|
) }}
|
||||||
|
|
||||||
{{ page_footer(
|
{{ page_footer(
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_email_reply_to', service_id =current_service.id, reply_to_email_id = item.id) }}">Change</a>
|
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_email_reply_to', service_id =current_service.id, reply_to_email_id = item.id) }}">Change</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_service.count_email_reply_to_addresses > 1 %}
|
{% if current_service.count_email_reply_to_addresses > 1 %}
|
||||||
{{ api_key(item.id, item.email_address, thing="ID", heading=False) }}
|
{{ api_key(item.id, name=item.email_address, thing="ID") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_letter_contact', service_id =current_service.id, letter_contact_id = item.id) }}">Change</a>
|
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_letter_contact', service_id =current_service.id, letter_contact_id = item.id) }}">Change</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if letter_contact_details|length > 1 %}
|
{% if letter_contact_details|length > 1 %}
|
||||||
{{ api_key(item.id, thing="ID") }}
|
{% set first_line_of_contact_block = item.contact_block|normalise_lines|first %}
|
||||||
|
{{ api_key(item.id, name=first_line_of_contact_block, thing="ID") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_sms_sender', service_id=current_service.id, sms_sender_id = item.id) }}">Change</a>
|
<a class="govuk-link govuk-link--no-visited-state user-list-edit-link" href="{{ url_for('.service_edit_sms_sender', service_id=current_service.id, sms_sender_id = item.id) }}">Change</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_service.count_sms_senders > 1 %}
|
{% if current_service.count_sms_senders > 1 %}
|
||||||
{{ api_key(item.id, thing="ID") }}
|
{{ api_key(item.id, name=item.sms_sender, thing="ID") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user