~netlandish/django-wiki

82cdc572332b50ed230a566c7274b157040abf07 — Sean Meyer 4 years ago cb202f5
Fix up group dropdown in permissions form

1 files changed, 3 insertions(+), 6 deletions(-)

M src/wiki/forms.py
M src/wiki/forms.py => src/wiki/forms.py +3 -6
@@ 447,10 447,9 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
        help_text=_("Enter the username of the owner."),
    )
    group = forms.ModelChoiceField(
        Group.objects.all(), empty_label=_("(none)"), label=_("Group"), required=False
        Group.objects.all(), empty_label=_("(none)"), label=_("Group"), required=False,
        widget=forms.Select(attrs={"class": "form-control"})
    )
    if settings.USE_BOOTSTRAP_SELECT_WIDGET:
        group.widget = SelectWidgetBootstrap()

    recursive = forms.BooleanField(
        label=_("Inherit permissions"),


@@ 511,9 510,7 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
                else Group.objects.none(),
                empty_label=_("(none)"),
                required=False,
                widget=SelectWidgetBootstrap(disabled=True)
                if settings.USE_BOOTSTRAP_SELECT_WIDGET
                else forms.Select(attrs={"disabled": True}),
                widget=forms.Select(attrs={"disabled": True}),
            )
            self.fields["group_read"].widget = forms.HiddenInput()
            self.fields["group_write"].widget = forms.HiddenInput()