kopia lustrzana https://github.com/wagtail/wagtail
Add asterisk after required blocks in StreamField
rodzic
c51177a0fa
commit
d0288de2f8
|
@ -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;
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Ładowanie…
Reference in New Issue