Commit 156b9657 by Fábián János

better bug fix:Transfer ownership

parent 8668bbfe
......@@ -1433,7 +1433,7 @@ class AclUserOrGroupAddForm(forms.Form):
class TransferOwnershipForm(forms.Form):
name = autocomplete.Select2ListChoiceField(
name = autocomplete.Select2ListCreateChoiceField(
widget=autocomplete.ListSelect2(
url='autocomplete.acl.user',
attrs={'class': 'form-control',
......@@ -1442,6 +1442,7 @@ class TransferOwnershipForm(forms.Form):
label=_("E-mail address or identifier of user"))
class AddGroupMemberForm(forms.Form):
new_member = autocomplete.Select2ListChoiceField(
widget=autocomplete.ListSelect2(
......
......@@ -632,7 +632,7 @@ class TransferOwnershipView(CheckedDetailView, DetailView):
def post(self, request, *args, **kwargs):
form = TransferOwnershipForm(request.POST)
if request.POST.get('name') is None:
if not form.is_valid():
return self.get(request)
try:
new_owner = search_user(request.POST['name'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment