mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 18:11:09 +00:00
Fixes id clashes in shelf forms
This commit is contained in:
parent
746d4bdba4
commit
4dc504c058
1 changed files with 6 additions and 3 deletions
|
@ -1,19 +1,21 @@
|
|||
{% load i18n %}
|
||||
{% load utilities %}
|
||||
{% with 0|uuid as uuid %}
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
|
||||
{% if editable %}
|
||||
<div class="field">
|
||||
<label class="label" for="id_name">{% trans "Name:" %}</label>
|
||||
{{ form.name }}
|
||||
<input type="text" name="name" value="{{ form.name.value|default:'' }}" maxlength="100" class="input" required="" id="id_name">
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="name" required="true" value="{{ shelf.name }}">
|
||||
{% endif %}
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_description">{% trans "Description:" %}</label>
|
||||
{{ form.description }}
|
||||
<label class="label" for="id_description_{{ uuid }}">{% trans "Description:" %}</label>
|
||||
<textarea name="description" cols="40" rows="5" maxlength="500" class="textarea" id="id_description_{{ uuid }}">{{ form.description.value|default:'' }}</textarea>
|
||||
</div>
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
|
@ -23,3 +25,4 @@
|
|||
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
|
|
Loading…
Reference in a new issue