mirror of
https://github.com/pretix/pretix.git
synced 2026-08-23 12:51:59 +00:00
Order edit form: fix yes/no-question not being optional (Z#23117305) (#3149)
This commit is contained in:
@@ -719,7 +719,7 @@ class BaseQuestionsForm(forms.Form):
|
|||||||
label = escape(q.question) # django-bootstrap3 calls mark_safe
|
label = escape(q.question) # django-bootstrap3 calls mark_safe
|
||||||
required = q.required and not self.all_optional
|
required = q.required and not self.all_optional
|
||||||
if q.type == Question.TYPE_BOOLEAN:
|
if q.type == Question.TYPE_BOOLEAN:
|
||||||
if q.required:
|
if required:
|
||||||
# For some reason, django-bootstrap3 does not set the required attribute
|
# For some reason, django-bootstrap3 does not set the required attribute
|
||||||
# itself.
|
# itself.
|
||||||
widget = forms.CheckboxInput(attrs={'required': 'required'})
|
widget = forms.CheckboxInput(attrs={'required': 'required'})
|
||||||
|
|||||||
Reference in New Issue
Block a user