From 9ee95f0bec214bafd774077bbdee7066a849fb90 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Sat, 2 Mar 2019 11:23:16 +0100 Subject: [PATCH] Fix checkbox position on the login page --- CHANGELOG.rst | 1 + cas_server/forms.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4f849a3..e0beb0a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,7 @@ Unreleased Fixes ----- +* Fix checkbox position on the login page * Set ldap3 client_strategy from sync to sync-restartable v1.0.0 - 2019-01-12 diff --git a/cas_server/forms.py b/cas_server/forms.py index 3c42bab..107423c 100644 --- a/cas_server/forms.py +++ b/cas_server/forms.py @@ -31,7 +31,10 @@ class BootsrapForm(forms.Form): # Only tweak the field if it will be displayed if not isinstance(field.widget, widgets.HiddenInput): attrs = {} - if isinstance(field.widget, (widgets.Input, widgets.Select, widgets.Textarea)): + if ( + isinstance(field.widget, (widgets.Input, widgets.Select, widgets.Textarea)) and + not isinstance(field.widget, (widgets.CheckboxInput,)) + ): attrs['class'] = "form-control" if isinstance(field.widget, (widgets.Input, widgets.Textarea)) and field.label: attrs["placeholder"] = field.label