fix group form ids

Also adds the List form to the group FindUsers view
This commit is contained in:
Hugh Rundle 2022-01-02 09:08:04 +11:00
parent 8e17e20802
commit b1fa57d2ca
No known key found for this signature in database
GPG key ID: CD23D6039184286B
2 changed files with 5 additions and 4 deletions

View file

@ -5,11 +5,11 @@
<div class="column is-two-thirds">
<input type="hidden" name="user" value="{{ request.user.id }}" />
<div class="field">
<label class="label" for="id_name">{% trans "Group Name:" %}</label>
<label class="label" for="group_form_id_name">{% trans "Group Name:" %}</label>
{{ group_form.name }}
</div>
<div class="field">
<label class="label" for="id_description">{% trans "Group Description:" %}</label>
<label class="label" for="group_form_id_description">{% trans "Group Description:" %}</label>
{{ group_form.description }}
</div>
</div>

View file

@ -34,7 +34,7 @@ class Group(View):
data = {
"group": group,
"lists": lists,
"group_form": forms.GroupForm(instance=group),
"group_form": forms.GroupForm(instance=group,auto_id='group_form_id_%s'),
"list_form": forms.ListForm(),
"path": "/group",
}
@ -153,7 +153,8 @@ class FindUsers(View):
data = {
"suggested_users": user_results,
"group": group,
"group_form": forms.GroupForm(instance=group),
"group_form": forms.GroupForm(instance=group,auto_id='group_form_id_%s'),
"list_form": forms.ListForm(),
"user_query": user_query,
"requestor_is_manager": request.user == group.user,
}