0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add asterisk after required blocks in StreamField

This commit is contained in:
riceyrice 2016-06-01 17:57:04 +01:00 committed by Matt Westcott
parent c51177a0fa
commit d0288de2f8
2 changed files with 12 additions and 1 deletions

View File

@ -41,6 +41,17 @@ li.sequence-member {
padding: 1.5em 0;
}
}
// 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 {

View File

@ -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 %}