mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-29 11:30:39 +00:00
Change text on cw button
This commit is contained in:
parent
c0dc3c5c05
commit
34a2afc788
3 changed files with 21 additions and 17 deletions
18
bookwyrm/templates/snippets/content_warning_field.html
Normal file
18
bookwyrm/templates/snippets/content_warning_field.html
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue