{# # One or zero ModelForm with one or multiple one to many related inline formsets #} {% from 'bs_form_body.htm' import bs_form_body with context -%} {% macro bs_inline_formsets(related_form, formsets, action, html) -%} {% if formsets|get_type != 'list' -%} {{ raise('"formsets" argument should be the list of formsets') }} {% endif -%} {% set wrapper_atts = { 'class': 'formsets panel panel-default default-padding' } -%} {% if not html.layout_classes -%} {% do html.update({'layout_classes': layout_classes}) -%} {% endif -%} {% if html.class -%} {% do tpl.add_css_classes_to_dict(wrapper_atts, html.class) -%} {% endif -%} {% if action == '' -%} {% do tpl.add_css_classes_to_dict(wrapper_atts, 'display-only') -%} {% endif -%} {% set table_classes = 'table table-bordered table-responsive' -%}