mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-25 09:30:33 +00:00
adding sort title to edit book form
This commit is contained in:
parent
3f205f1b10
commit
a6e5939ad2
2 changed files with 13 additions and 0 deletions
|
@ -20,6 +20,7 @@ class EditionForm(CustomForm):
|
|||
model = models.Edition
|
||||
fields = [
|
||||
"title",
|
||||
"sort_title",
|
||||
"subtitle",
|
||||
"description",
|
||||
"series",
|
||||
|
@ -45,6 +46,9 @@ class EditionForm(CustomForm):
|
|||
]
|
||||
widgets = {
|
||||
"title": forms.TextInput(attrs={"aria-describedby": "desc_title"}),
|
||||
"sort_title": forms.TextInput(
|
||||
attrs={"aria-describedby": "desc_sort_title"}
|
||||
),
|
||||
"subtitle": forms.TextInput(attrs={"aria-describedby": "desc_subtitle"}),
|
||||
"description": forms.Textarea(
|
||||
attrs={"aria-describedby": "desc_description"}
|
||||
|
|
|
@ -28,6 +28,15 @@
|
|||
{% include 'snippets/form_errors.html' with errors_list=form.title.errors id="desc_title" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_sort_title">
|
||||
{% trans "Sort Title:" %}
|
||||
</label>
|
||||
<input type="text" name="sort_title" value="{{ form.sort_title.value|default:'' }}" maxlength="255" class="input" required="" id="id_sort_title" aria-describedby="desc_sort_title">
|
||||
|
||||
{% include 'snippets/form_errors.html' with errors_list=form.sort_title.errors id="desc_sort_title" %}
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_subtitle">
|
||||
{% trans "Subtitle:" %}
|
||||
|
|
Loading…
Reference in a new issue