mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 21:26:33 +00:00
Don't use localstorage cache for edits
This commit is contained in:
parent
e149a14e73
commit
df27614937
6 changed files with 9 additions and 9 deletions
|
@ -35,7 +35,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
size="3"
|
size="3"
|
||||||
value="{% firstof draft.progress readthrough.progress '' %}"
|
value="{% firstof draft.progress readthrough.progress '' %}"
|
||||||
id="progress_{{ uuid }}"
|
id="progress_{{ uuid }}"
|
||||||
data-cache-draft="id_progress_comment_{{ book.id }}"
|
{% if not draft %}data-cache-draft="id_progress_comment_{{ book.id }}"{% endif %}
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
@ -43,7 +43,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
<select
|
<select
|
||||||
name="progress_mode"
|
name="progress_mode"
|
||||||
aria-label="Progress mode"
|
aria-label="Progress mode"
|
||||||
data-cache-draft="id_progress_mode_comment_{{ book.id }}"
|
{% if not draft %}data-cache-draft="id_progress_mode_comment_{{ book.id }}"{% endif %}
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value="PG"
|
value="PG"
|
||||||
|
|
|
@ -11,7 +11,7 @@ draft: an existing Status object that is providing default values for input fiel
|
||||||
<textarea
|
<textarea
|
||||||
name="content"
|
name="content"
|
||||||
class="textarea save-draft"
|
class="textarea save-draft"
|
||||||
data-cache-draft="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
|
{% if not draft %}data-cache-draft="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"{% endif %}
|
||||||
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}{{ uuid }}"
|
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}{{ uuid }}"
|
||||||
placeholder="{{ placeholder }}"
|
placeholder="{{ placeholder }}"
|
||||||
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
|
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
|
||||||
|
|
|
@ -17,6 +17,6 @@
|
||||||
id="id_content_warning_{{ uuid }}{{ local_uuid }}"
|
id="id_content_warning_{{ uuid }}{{ local_uuid }}"
|
||||||
placeholder="{% trans 'Spoilers ahead!' %}"
|
placeholder="{% trans 'Spoilers ahead!' %}"
|
||||||
value="{% firstof draft.content_warning reply_parent.content_warning '' %}"
|
value="{% firstof draft.content_warning reply_parent.content_warning '' %}"
|
||||||
data-cache-draft="id_content_warning_{{ book.id }}_{{ type }}"
|
{% if not draft %}data-cache-draft="id_content_warning_{{ book.id }}_{{ type }}"{% endif %}
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
id="id_show_spoilers_{{ uuid }}{{ local_uuid }}"
|
id="id_show_spoilers_{{ uuid }}{{ local_uuid }}"
|
||||||
{% if draft.content_warning or status.content_warning %}checked{% endif %}
|
{% if draft.content_warning or status.content_warning %}checked{% endif %}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
data-cache-draft="id_sensitive_{{ book.id }}_{{ type }}{{ reply_parent.id }}"
|
{% if not draft %}data-cache-draft="id_sensitive_{{ book.id }}_{{ type }}{{ reply_parent.id }}"{% endif %}
|
||||||
>
|
>
|
||||||
{% trans "Include spoiler alert" as button_text %}
|
{% trans "Include spoiler alert" as button_text %}
|
||||||
{% firstof draft.content_warning status.content_warning as pressed %}
|
{% firstof draft.content_warning status.content_warning as pressed %}
|
||||||
|
|
|
@ -24,7 +24,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
id="id_quote_{{ book.id }}_{{ type }}"
|
id="id_quote_{{ book.id }}_{{ type }}"
|
||||||
placeholder="{% blocktrans with book_title=book.title %}An excerpt from '{{ book_title }}'{% endblocktrans %}"
|
placeholder="{% blocktrans with book_title=book.title %}An excerpt from '{{ book_title }}'{% endblocktrans %}"
|
||||||
required
|
required
|
||||||
data-cache-draft="id_quote_{{ book.id }}_{{ type }}"
|
{% if not draft %}data-cache-draft="id_quote_{{ book.id }}_{{ type }}"{% endif %}
|
||||||
>{{ draft.quote|default:'' }}</textarea>
|
>{{ draft.quote|default:'' }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
<select
|
<select
|
||||||
name="position_mode"
|
name="position_mode"
|
||||||
aria-label="Position mode"
|
aria-label="Position mode"
|
||||||
data-cache-draft="id_position_mode_{{ book.id }}_{{ type }}"
|
{% if not draft %}data-cache-draft="id_position_mode_{{ book.id }}_{{ type }}"{% endif %}
|
||||||
>
|
>
|
||||||
<option
|
<option
|
||||||
value="PG"
|
value="PG"
|
||||||
|
@ -63,7 +63,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
size="3"
|
size="3"
|
||||||
value="{% firstof draft.position '' %}"
|
value="{% firstof draft.position '' %}"
|
||||||
id="position_{{ uuid }}"
|
id="position_{{ uuid }}"
|
||||||
data-cache-draft="id_position_{{ book.id }}_{{ type }}"
|
{% if not draft %}data-cache-draft="id_position_{{ book.id }}_{{ type }}"{% endif %}
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@ uuid: a unique identifier used to make html "id" attributes unique and clarify j
|
||||||
id="id_name_{{ book.id }}"
|
id="id_name_{{ book.id }}"
|
||||||
placeholder="{% blocktrans with book_title=book.title %}Your review of '{{ book_title }}'{% endblocktrans %}"
|
placeholder="{% blocktrans with book_title=book.title %}Your review of '{{ book_title }}'{% endblocktrans %}"
|
||||||
value="{% firstof draft.name ''%}"
|
value="{% firstof draft.name ''%}"
|
||||||
data-cache-draft="id_name_{{ book.id }}_{{ type }}"
|
{% if not draft %}data-cache-draft="id_name_{{ book.id }}_{{ type }}"{% endif %}
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue