Merge pull request #1422 from bookwyrm-social/cw-label

Show label for content warning field
This commit is contained in:
Mouse Reeve 2021-09-18 12:13:07 -07:00 committed by GitHub
commit e39136c34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 18 deletions

View file

@ -1,6 +1,14 @@
{% load i18n %} {% load i18n %}
<div class="control{% if not parent_status.content_warning and not draft.content_warning %} is-hidden{% endif %}" id="spoilers_{{ uuid }}"> <div
<label class="is-sr-only" for="id_content_warning_{{ uuid }}">{% trans "Spoiler alert:" %}</label> class="field{% if not parent_status.content_warning and not draft.content_warning %} is-hidden{% endif %}"
id="spoilers_{{ uuid }}"
>
<label
class="label"
for="id_content_warning_{{ uuid }}"
>
{% trans "Content warning:" %}
</label>
<input <input
type="text" type="text"
name="content_warning" name="content_warning"

View file

@ -25,10 +25,7 @@ reply_parent: the Status object this post will be in reply to, if applicable
<input type="hidden" name="reply_parent" value="{% firstof draft.reply_parent.id reply_parent.id %}"> <input type="hidden" name="reply_parent" value="{% firstof draft.reply_parent.id reply_parent.id %}">
{% endblock %} {% endblock %}
<div class="field">
<div class="control">
{% include "snippets/create_status/content_warning_field.html" %} {% include "snippets/create_status/content_warning_field.html" %}
</div>
{# fields that go between the content warnings and the content field (ie, quote) #} {# fields that go between the content warnings and the content field (ie, quote) #}
{% block pre_content_additions %}{% endblock %} {% block pre_content_additions %}{% endblock %}
@ -39,10 +36,9 @@ reply_parent: the Status object this post will be in reply to, if applicable
{% endblock %} {% endblock %}
</label> </label>
<div class="control"> <div class="field">
{% include "snippets/create_status/content_field.html" with placeholder=placeholder %} {% include "snippets/create_status/content_field.html" with placeholder=placeholder %}
</div> </div>
</div>
{# additional fields that go after the content block (ie, progress) #} {# additional fields that go after the content block (ie, progress) #}
{% block post_content_additions %}{% endblock %} {% block post_content_additions %}{% endblock %}