Refactor on/off table fields into component

There’s a lot of repeated code in our Jinja templates for the settings
page.

We already have a `boolean_field` component, but it’s not used anywhere
(it was just lifted from Digital Marketplace).

So this commit changes the `boolean_field` component to be useful for
our on/off use case, and wires it into the settings page.
This commit is contained in:
Chris Hill-Scott
2017-06-07 14:54:23 +01:00
parent 363a3e1864
commit f150e2be12
3 changed files with 7 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
{% extends "withnav_template.html" %}
{% from "components/table.html" import list_table, row, field, boolean_field, hidden_field_heading %}
{% from "components/table.html" import list_table, row, field, hidden_field_heading %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/tick-cross.html" import tick_cross %}