Skip to content

Commit

Permalink
Preserve custom BootstrapCheckboxInput widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
gherceg committed Jan 22, 2025
1 parent 9ca6192 commit c6a80bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion corehq/apps/domain/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,8 @@ def __init__(self, *args, **kwargs):
excluded_fields.append('secure_sessions_timeout')

for field in self.fields.values():
if isinstance(field, BooleanField):
has_custom_input = isinstance(field.widget, BootstrapCheckboxInput)
if isinstance(field, BooleanField) and not has_custom_input:
field.widget = BootstrapCheckboxInput()

fields = [hqcrispy.CheckboxField(field_name)
Expand Down

0 comments on commit c6a80bd

Please sign in to comment.