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:
parent
c51177a0fa
commit
d0288de2f8
@ -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 {
|
||||
|
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user