diff --git a/webapp/forms.py b/webapp/forms.py index 956216c..292f034 100644 --- a/webapp/forms.py +++ b/webapp/forms.py @@ -39,7 +39,7 @@ class KaehmyForm_Form(forms.ModelForm): self.fields["phone_number"].label = _('Phone number (not public)') custom_roles_exist = CustomKaehmyRole.objects.all().exists() - self.fields["custom_roles"].widget = forms.widgets.CheckboxSelectMultiple if custom_roles_exist else forms.HiddenInput() + self.fields["custom_roles"].widget = forms.widgets.CheckboxSelectMultiple() if custom_roles_exist else forms.HiddenInput() self.fields["custom_roles"].help_text = "" self.fields["custom_roles"].label = _('Custom roles') self.fields["custom_roles"].queryset = CustomKaehmyRole.objects.all() diff --git a/webapp/templates/kaehmy.html b/webapp/templates/kaehmy.html index 5a73d76..e0f5a30 100644 --- a/webapp/templates/kaehmy.html +++ b/webapp/templates/kaehmy.html @@ -51,7 +51,19 @@ {% endif %} {% endfor %} - + + {% for custom_field in form %} + {% if custom_field.name == 'custom_roles' %} +