Add bootstrap 4 size XL in bootstrap_size_match
Bootstrap 4 introduce XL in col sizes for responsive (and remove XS).
When a horizontal-form is used crispy form generate an offest-{responsive-breakpoint}-{col-size} class for field without label.
@@ -368,6 +368,16 @@ class FormHelper(DynamicLayoutHandler):
'field_class': self.field_class,
'include_media': self.include_media
}
+
+ if template_pack == 'bootstrap4':
+ bootstrap_size_match = re.findall('col-(xl|lg|md|sm)-(\d+)', self.label_class)
+ if bootstrap_size_match:
+ if template_pack == 'bootstrap4':
+ offset_pattern = 'offset-%s-%s'
+ else:
+ offset_pattern = 'col-%s-offset-%s'
+ items['bootstrap_checkbox_offsets'] = [offset_pattern % m for m in bootstrap_size_match]
+ else:
bootstrap_size_match = re.findall('col-(lg|md|sm|xs)-(\d+)', self.label_class)
if bootstrap_size_match:
if template_pack == 'bootstrap4':
