Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1732 Show asterisk after required StreamField block labels #2663

Closed
wants to merge 3 commits into from
Closed

Fix #1732 Show asterisk after required StreamField block labels #2663

wants to merge 3 commits into from

Conversation

riceyrice
Copy link
Contributor

Fix for #1732. Not sure the SCSS is in the approved place but it works.
Also added a colon for consistency with normal field labels.

@gasman gasman added this to the 1.6 milestone Jun 1, 2016
@@ -5,9 +5,9 @@

<ul class="fields">
{% for child in children.values %}
<li>
<li{% if child.block.field.required %} class="required"{% endif %}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to avoid referring to child.block.field here - block objects don't always wrap a Django form field, and the ones that don't might have a different idea of how "required-ness" is defined. I think we can fix this nicely by adding a standard required property to Block (which would be false by default, and pick up the value from self.field in the case of FieldBlock) - I'll make this change.

gasman added a commit that referenced this pull request Jul 21, 2016
@gasman
Copy link
Collaborator

gasman commented Jul 21, 2016

Merged in e9279c8 + parents - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants