mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Make pricing table searchable
uses the same pattern as searching templates by name.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{% from "components/table.html" import mapping_table, row, text_field, row_heading %}
|
||||
{% from "components/table.html" import mapping_table, row, text_field, field, row_heading %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
|
||||
{% extends "withoutnav_template.html" %}
|
||||
|
||||
@@ -60,20 +61,34 @@
|
||||
times the cost of messages to UK mobile numbers.
|
||||
</p>
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Letter pricing',
|
||||
field_headings=['Country code', 'Country', 'Cost multipler'],
|
||||
field_headings_visible=True,
|
||||
caption_visible=False
|
||||
) %}
|
||||
{% for cc, names, billable_units in international_sms_rates %}
|
||||
{% call row() %}
|
||||
{{ text_field('+ '|safe + cc) }}
|
||||
{{ text_field(names[0]) }}
|
||||
{{ text_field('{} ×'.format(billable_units)|safe) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
<div class="live-search" data-module="live-search" data-targets="#international-pricing .table-row">
|
||||
{{ textbox(
|
||||
search_form.search,
|
||||
width='1-1',
|
||||
label='Search by country name or code'
|
||||
) }}
|
||||
</div>
|
||||
|
||||
<div id="international-pricing" class="bottom-gutter-3-2">
|
||||
{% call mapping_table(
|
||||
caption='Letter pricing',
|
||||
field_headings=['Country code', 'Country', 'Cost multipler'],
|
||||
field_headings_visible=True,
|
||||
caption_visible=False
|
||||
) %}
|
||||
{% for cc, names, billable_units in international_sms_rates %}
|
||||
{% call row() %}
|
||||
{{ text_field('+' + cc) }}
|
||||
{% call field() %}
|
||||
{% for name in names %}
|
||||
{{ name }}<br>
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
{{ text_field('{} ×'.format(billable_units)|safe) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
<h2 class="heading-medium">
|
||||
Letters
|
||||
|
||||
Reference in New Issue
Block a user