Add styles for nested lists of radios

Assumes lists that are descendants of a radio
control should be indented at the same amount as
their label text.
This commit is contained in:
Tom Byers
2019-01-04 11:56:15 +00:00
parent 9bce22f766
commit 33800c5f27
2 changed files with 9 additions and 3 deletions

View File

@@ -251,6 +251,11 @@ details .arrow {
cursor: default; cursor: default;
} }
.multiple-choice > .panel {
border-left: none;
padding: 0 0 0 12px;
}
.heading-inline { .heading-inline {
display: inline-block; display: inline-block;
} }

View File

@@ -19,9 +19,10 @@
options, options,
child_map, child_map,
disable=[], disable=[],
option_hints={} option_hints={},
top_level=False
) %} ) %}
<ul> <ul{% if not top_level %} class="panel panel-border-narrow"{% endif %}>
{% for option in options %} {% for option in options %}
{% if child_map[option.data] %} {% if child_map[option.data] %}
{% call radio(option, disable, option_hints, as_list_item=True) %} {% call radio(option, disable, option_hints, as_list_item=True) %}
@@ -46,7 +47,7 @@
{% call radios_wrapper( {% call radios_wrapper(
field, hint, disable, option_hints, hide_legend field, hint, disable, option_hints, hide_legend
) %} ) %}
{{ radio_list(child_map[None], child_map, disable, option_hints) }} {{ radio_list(child_map[None], child_map, disable, option_hints, top_level=True) }}
{% endcall %} {% endcall %}
{% endmacro %} {% endmacro %}