Change text on cw button

This commit is contained in:
Mouse Reeve 2020-12-17 11:05:37 -08:00
parent c0dc3c5c05
commit 34a2afc788
3 changed files with 21 additions and 17 deletions

View file

@ -0,0 +1,18 @@
<div class="control">
<div>
<input type="radio" class="toggle-control" name="content-warning-toggle" id="hide-spoilers-{{ book.id }}-{{ type }}" {% if not parent_status.content_warning %}checked{% endif %}>
<div class="toggle-content hidden">
<label class="button is-small" role="button" tabindex="0" for="include-spoilers-{{ book.id }}-{{ type }}">Add spoilers/content warning</label>
</div>
</div>
<div>
<input type="radio" class="toggle-control" id="include-spoilers-{{ book.id }}-{{ type }}" name="content-warning-toggle" {% if parent_status.content_warning %}checked{% endif %}>
<div class="toggle-content hidden">
<label class="button is-small" role="button" tabindex="0" for="hide-spoilers-{{ book.id }}-{{ type }}">Remove spoilers/content warning</label>
<label class="is-sr-only" for="id_content_warning_{{ book.id }}_{{ type }}">Spoilers/content warning:</label>
<input type="text" name="content_warning" maxlength="255" class="input" id="id_content_warning_{{ book.id }}_{{ type }}" placeholder="Spoilers ahead!" value="{{ parent_status.content_warning }}">
</div>
</div>
</div>

View file

@ -27,14 +27,7 @@
</fieldset>
{% endif %}
<div class="control">
<label class="button is-small" role="button" tabindex="0" for="include-spoilers-{{ book.id }}-{{ type }}">Add spoilers/content warning</label>
<input type="checkbox" class="toggle-control" id="include-spoilers-{{ book.id }}-{{ type }}">
<div class="toggle-content hidden">
<label class="is-sr-only" for="id_content_warning_{{ book.id }}_{{ type }}">Spoilers/content warning:</label>
<input type="text" name="content_warning" maxlength="255" class="input" id="id_content_warning_{{ book.id }}_{{ type }}" placeholder="Spoilers ahead!">
</div>
</div>
{% include 'snippets/content_warning_field.html' %}
{% if type == 'quote' %}
<textarea name="quote" class="textarea" id="id_quote_{{ book.id }}_{{ type }}" placeholder="{{ placeholder }}" required></textarea>

View file

@ -6,19 +6,12 @@
<input type="hidden" name="reply_parent" value="{{ activity.id }}">
<input type="hidden" name="user" value="{{ request.user.id }}">
<div class="column">
<div class="control">
<label class="button is-small" role="button" tabindex="0" for="include-spoilers-{{ book.id }}-{{ type }}">Add spoilers/content warning</label>
<input type="checkbox" class="toggle-control" id="include-spoilers-{{ book.id }}-{{ type }}">
<div class="toggle-content hidden">
<label class="is-sr-only" for="id_content_warning_{{ book.id }}_{{ type }}">Spoilers/content warning:</label>
<input type="text" name="content_warning" maxlength="255" class="input" id="id_content_warning_{{ book.id }}_{{ type }}" placeholder="Spoilers ahead!">
</div>
</div>
{% include 'snippets/content_warning_field.html' with parent_status=activity %}
<div class="field">
<textarea class="textarea" name="content" placeholder="Leave a comment..." id="id_content_{{ activity.id }}-{{ uuid }}" required="true"></textarea>
</div>
</div>
<div class="column is-narrow">
<div class="field">
{% include 'snippets/privacy_select.html' with current=activity.privacy %}