moviewyrm/bookwyrm/templates/snippets/create_status/review.html
2022-01-18 12:28:59 -08:00

40 lines
1.4 KiB
HTML

{% extends "snippets/create_status/layout.html" %}
{% load utilities %}
{% load status_display %}
{% load i18n %}
{% comment %}
----- Variables
book: the Edition object this status is related to. Required unless the status is a reply
draft: the content of an existing Status object to be edited (used in delete and redraft)
uuid: a unique identifier used to make html "id" attributes unique and clarify javascript controls
{% endcomment %}
{% block pre_content_additions %}
<div class="field">
<label class="label" for="id_name_{{ book.id }}">{% trans "Title:" %}</label>
<div class="control">
<input
type="text"
name="name"
maxlength="255"
class="input"
required=""
id="id_name_{{ book.id }}"
placeholder="{% blocktrans with book_title=book.title %}Your review of '{{ book_title }}'{% endblocktrans %}"
value="{% firstof draft.name ''%}"
{% if not draft %}data-cache-draft="id_name_{{ book.id }}_{{ type }}"{% endif %}
>
</div>
</div>
<fieldset class="mb-1">
<legend class="is-sr-only">{% trans "Rating" %}</legend>
{% include 'snippets/form_rate_stars.html' with book=book type=type|default:'summary' default_rating=draft.rating %}
</fieldset>
{% endblock %}
{% block content_label %}
{% trans "Review:" %}
{% endblock %}