Add asterisk after required blocks in StreamField

pull/2868/head
riceyrice 2016-06-01 17:57:04 +01:00 zatwierdzone przez Matt Westcott
rodzic c51177a0fa
commit d0288de2f8
2 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

@ -42,6 +42,17 @@ li.sequence-member {
}
}
// Copied from page-editor.scss
.struct-block li.required > label:after {
content: '*';
color: $color-red;
font-weight: bold;
display: inline-block;
margin-left: 0.5em;
line-height: 1em;
font-size: 13px;
}
// The top level sequence doesn't have a sequnce-member-inner. This block is basically for things that should only affect inner blocks
.sequence-member-inner {
@include clearfix;

Wyświetl plik

@ -5,7 +5,7 @@
<ul class="fields">
{% for child in children.values %}
<li>
<li{% if child.block.field.required %} class="required"{% endif %}>
{% if child.block.label %}
<label{% if child.id_for_label %} for="{{ child.id_for_label }}"{% endif %}>{{ child.block.label }}</label>
{% endif %}