Update ChoiceForm to be full height

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-24 22:19:31 -04:00
parent fcfadb0caa
commit c2d287c262
3 changed files with 8 additions and 2 deletions

View File

@@ -146,6 +146,7 @@
* Rename form template 'form_class' to 'form_css_classes'. * Rename form template 'form_class' to 'form_css_classes'.
* Add support for adding form button aside from the * Add support for adding form button aside from the
default submit and cancel. default submit and cancel.
* Update ChoiceForm to be full height.
3.1.11 (2019-04-XX) 3.1.11 (2019-04-XX)
=================== ===================

View File

@@ -178,6 +178,7 @@ Other changes
* Rename form template 'form_class' to 'form_css_classes'. * Rename form template 'form_class' to 'form_css_classes'.
* Add support for adding form button aside from the * Add support for adding form button aside from the
default submit and cancel. default submit and cancel.
* Update ChoiceForm to be full height.
Removals Removals
-------- --------

View File

@@ -34,10 +34,14 @@ class ChoiceForm(forms.Form):
self.fields['selection'].help_text = help_text self.fields['selection'].help_text = help_text
self.fields['selection'].widget.disabled_choices = disabled_choices self.fields['selection'].widget.disabled_choices = disabled_choices
self.fields['selection'].widget.attrs.update( 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): class FormOptions(object):