diff --git a/HISTORY.rst b/HISTORY.rst index 93a0e9bcb2..73d9427ae6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -146,6 +146,7 @@ * Rename form template 'form_class' to 'form_css_classes'. * Add support for adding form button aside from the default submit and cancel. +* Update ChoiceForm to be full height. 3.1.11 (2019-04-XX) =================== diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index 53ff0eae91..1da32ba85a 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -178,6 +178,7 @@ Other changes * Rename form template 'form_class' to 'form_css_classes'. * Add support for adding form button aside from the default submit and cancel. +* Update ChoiceForm to be full height. Removals -------- diff --git a/mayan/apps/common/forms.py b/mayan/apps/common/forms.py index d5b873101d..0ca07b6797 100644 --- a/mayan/apps/common/forms.py +++ b/mayan/apps/common/forms.py @@ -34,10 +34,14 @@ class ChoiceForm(forms.Form): self.fields['selection'].help_text = help_text self.fields['selection'].widget.disabled_choices = disabled_choices self.fields['selection'].widget.attrs.update( - {'size': 14, 'class': 'choice_form'} + { + 'class': 'full-height', 'data-height-difference': '450' + } ) - selection = forms.MultipleChoiceField(widget=DisableableSelectWidget()) + selection = forms.MultipleChoiceField( + required=False, widget=DisableableSelectWidget() + ) class FormOptions(object):