Always use underscores in html ids
Plus some other shifting around
This commit is contained in:
19
bookwyrm/templates/snippets/create_status/content_field.html
Normal file
19
bookwyrm/templates/snippets/create_status/content_field.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% load status_display %}
|
||||
{% load utilities %}
|
||||
{% comment %}
|
||||
type: used to differentiate html id fields when multiple types of posting are available for a book (options: comment, quotation, review, direct, reply)
|
||||
book: the Edition object related to the status
|
||||
reply_parent: if applicable, the Status object that this post is in reply to
|
||||
mention: a user who is @ mentioned by default in the post
|
||||
draft: an existing Status object that is providing default values for input fields
|
||||
{% endcomment %}
|
||||
<textarea
|
||||
name="content"
|
||||
class="textarea"
|
||||
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
|
||||
placeholder="{{ placeholder }}"
|
||||
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
|
||||
required
|
||||
>{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{{ draft.content|default:'' }}</textarea>
|
||||
|
Reference in New Issue
Block a user