mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Tell users that they can search by reference
Users who have an API integration (and therefore have a way of passing in a reference for each notification) can now search by that reference (see https://github.com/alphagov/notifications-api/pull/2682) This commit changes the label on the search box to tell these users that this is possible, without changing the label for users without an API integration, who might get confused by what ‘reference’ means. It also makes the label consistently say ‘email address or phone number’ (ie email address is first) because this is our content style.
This commit is contained in:
@@ -227,6 +227,15 @@ def view_notifications(service_id, message_type=None):
|
||||
message_type=message_type,
|
||||
to=request.form.get('to', ''),
|
||||
),
|
||||
things_you_can_search_by={
|
||||
'email': ['email address'],
|
||||
'sms': ['phone number'],
|
||||
'letter': [],
|
||||
None: ['email address', 'phone number'],
|
||||
}.get(message_type) + {
|
||||
True: ['reference'],
|
||||
False: [],
|
||||
}.get(bool(current_service.api_keys)),
|
||||
download_link=url_for(
|
||||
'.download_notifications_csv',
|
||||
service_id=current_service.id,
|
||||
|
||||
@@ -41,6 +41,13 @@
|
||||
{{ textbox(
|
||||
search_form.to,
|
||||
width='1-1',
|
||||
label=things_you_can_search_by|formatted_list(
|
||||
conjunction='or',
|
||||
before_each='',
|
||||
after_each='',
|
||||
prefix='Search by',
|
||||
prefix_plural='Search by'
|
||||
)
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-one-quarter align-button-with-textbox">
|
||||
|
||||
Reference in New Issue
Block a user