mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 10:48:25 -04:00
Feat/webpack (#2998)
* First commit * Removed govuk for webpack. Modernized javascript importing. Removed dead js * Fixed tests, a few styling bugs * Fixed some table errors and regenerated backstop ref images * Updated tests for coverage * Changes from carlo suggestions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False) -%}
|
||||
<table class="usa-table{{' usa-table--borderless' if not border_visible}} width-full">
|
||||
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False, striped=False) -%}
|
||||
<table class="usa-table{{' usa-table--borderless' if not border_visible}}{{' usa-table--striped' if striped}} width-full">
|
||||
<caption class="font-body-lg table-heading{{ ' usa-sr-only' if not caption_visible}}">
|
||||
{{ caption }}
|
||||
</caption>
|
||||
@@ -22,10 +22,10 @@
|
||||
</table>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False) -%}
|
||||
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, border_visible=False, striped=False) -%}
|
||||
{% set parent_caller = caller %}
|
||||
|
||||
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible, equal_length, border_visible) %}
|
||||
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible, equal_length, border_visible, striped) %}
|
||||
{% for item in items %}
|
||||
{% call row(item.id) %}
|
||||
{{ parent_caller(item, loop.index + 1) }}
|
||||
|
||||
@@ -165,7 +165,7 @@ recipients.column_headers %}
|
||||
|
||||
<h2 class="font-body-lg" id="file-preview">{{ original_file_name }}</h2>
|
||||
|
||||
<div class="fullscreen-content" data-module="fullscreen-table">
|
||||
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
|
||||
{% call(item, row_number) list_table(
|
||||
recipients.displayed_rows,
|
||||
caption=original_file_name,
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fullscreen-content" data-module="fullscreen-table">
|
||||
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
|
||||
{% call(item, row_number) mapping_table(
|
||||
caption="Errors in " + original_file_name,
|
||||
caption_visible=False,
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<h2 class="font-body-lg">A spreadsheet is available to use</h2>
|
||||
|
||||
<div class="spreadsheet" data-module="fullscreen-table">
|
||||
<div class="spreadsheet usa-table-container--scrollable" tabindex="0">
|
||||
{% call(item, row_number) list_table(
|
||||
example,
|
||||
caption="Example spreadsheet",
|
||||
|
||||
@@ -39,16 +39,9 @@
|
||||
{% call row() %}
|
||||
{{ text_field('Send text messages') }}
|
||||
{{ boolean_field('sms' in current_service.permissions) }}
|
||||
{# {{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
service_id=current_service.id,
|
||||
channel='sms'
|
||||
),
|
||||
permissions=[ServicePermission.MANAGE_SERVICE],
|
||||
suffix='your settings for sending text messages',
|
||||
)}} #}
|
||||
{% call field(align='right') %}
|
||||
<span class="table-field-status-default">Set automatically</span>
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
{% if current_user.platform_admin %}
|
||||
@@ -218,6 +211,9 @@
|
||||
{{ text_field('Live')}}
|
||||
{% if current_service.trial_mode and not current_service.organization_id %}
|
||||
{{ text_field('No (organization must be set first)') }}
|
||||
{% call field(align='right') %}
|
||||
<span class="table-field-status-default">Set automatically</span>
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{{ boolean_field(not current_service.trial_mode) }}
|
||||
{{ edit_field('Change', url_for('.service_switch_live', service_id=current_service.id), suffix='service status') }}
|
||||
|
||||
Reference in New Issue
Block a user