mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Update all, but one, <details> to component
Includes: - in gulpfile.js: - add details macro to list of those copied from GOVUK Frontend - remove existing details polyfill - convert all, but one, <details> tags to use GOVUK Frontend details component - add jinja boolean filter to help setting 'open' attribute of <details> tags Notes on the `<details>` not included in this: The `<details>` used for notifications items on the API integration page is not possible to reproduce with the GOV.UK Frontend macro so I'm splitting the resulting work out into it's own commit.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
{% from "components/table.html" import mapping_table, field, stats_fields, row_group, row, right_aligned_field_heading, hidden_field_heading, text_field %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/details/macro.njk" import govukDetails %}
|
||||
|
||||
{% macro stats_fields(channel, data) -%}
|
||||
|
||||
@@ -101,16 +102,21 @@
|
||||
{{ page_title|capitalize }}
|
||||
</h1>
|
||||
|
||||
<details>
|
||||
<summary>Apply filters</summary>
|
||||
{% call form_wrapper(method="get") %}
|
||||
{{ textbox(form.start_date, hint="Enter start date in format YYYY-MM-DD") }}
|
||||
{{ textbox(form.end_date, hint="Enter end date in format YYYY-MM-DD") }}
|
||||
{{ checkbox(form.include_from_test_key) }}
|
||||
</br>
|
||||
<button type="submit" class="button">Filter</button>
|
||||
{% endcall %}
|
||||
</details>
|
||||
|
||||
{% set details_content %}
|
||||
{% call form_wrapper(method="get") %}
|
||||
{{ textbox(form.start_date, hint="Enter start date in format YYYY-MM-DD") }}
|
||||
{{ textbox(form.end_date, hint="Enter end date in format YYYY-MM-DD") }}
|
||||
{{ checkbox(form.include_from_test_key) }}
|
||||
</br>
|
||||
<button type="submit" class="button">Filter</button>
|
||||
{% endcall %}
|
||||
{% endset %}
|
||||
|
||||
{{ govukDetails({
|
||||
"summaryText": "Apply filters",
|
||||
"html": details_content
|
||||
}) }}
|
||||
|
||||
{% include "views/platform-admin/_global_stats.html" %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user