Repository: django-crispy-forms/crispy-bootstrap4 (language: python)

Issue:
checkboxselectmultiple and radioselect repeats form's attributes
Hi,

Thank you for this excellent project!
I discovered this bug in the templates; please check it out.

## Reproduction code

```python
from django import forms

class DemoForm(forms.Form):
    language = forms.MultipleChoiceField(
        choices=[
            ("cpp", "C++"),
            ("py", "Python"),
            ("js", "JavaScript"),
        ],
        widget=forms.CheckboxSelectMultiple(),
    )

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_id = "FORM_ID"
        self.helper.form_class = "FORM_CLASS"
        self.helper.attrs["ATTR"] = "VALUE"
```

## Actual vs expected output

```diff
<form ATTR="VALUE" class="FORM_CLASS" id="FORM_ID" method="post">
  <div id="div_id_language" class="form-group">
    <label>Language</label>
-    <div ATTR="VALUE" class="FORM_CLASS" id="FORM_ID">
+    <div>
      <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" name="language" value="cpp" id="id_language_0">
        <label class="custom-control-label" for="id_language_0">C++</label>
      </div>
      <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" name="language" value="py" id="id_language_1">
        <label class="custom-control-label" for="id_language_1">Python</label>
      </div>
      <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" name="language" value="js" id="id_language_2">
        <label class="custom-control-label" for="id_language_2">JavaScript</label>
      </div>
    </div>
  </div>
</form>
```

As you can see, `<form>`'s attributes are inherited by the `<div>`.

I could trace this problem back to this line:

https://github.com/django-crispy-forms/crispy-bootstrap4/blob/f25758822da29cf5b1e1d96694bb651e93b8ff23/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html#L4

I think it should be `field.flat_attrs` instead of `flat_attrs`, but I'm not familiar enough with this project to be sure.

As far as I could tell, only two templates are affected [checkboxselectmultiple.html](https://github.com/django-crispy-forms/crispy-bootstrap4/blob/f25758822da29cf5b1e1d96694bb651e93b8ff23/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html#L4) and [radioselect.html](https://github.com/django-crispy-forms/crispy-bootstrap4/blob/f25758822da29cf5b1e1d96694bb651e93b8ff23/crispy_bootstrap4/templates/bootstrap4/layout/radioselect.html#L4)

Best regards,
Benoit


Discussion / hints:
This bug is also present in the test suite:

https://github.com/django-crispy-forms/crispy-bootstrap4/blob/f25758822da29cf5b1e1d96694bb651e93b8ff23/tests/results/bootstrap4/test_layout/test_fundamentals_example.html#L1-L5

As you can see, `action="submit_survey"`, `class="blueForms"`, and `id="id-exampleForm"` are repeated on the `<div>`.

Fix patch:
diff --git a/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html b/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html
index 81e3792..1bc6c85 100644
--- a/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html
+++ b/crispy_bootstrap4/templates/bootstrap4/layout/checkboxselectmultiple.html
@@ -1,7 +1,7 @@
 {% load crispy_forms_filters %}
 {% load l10n %}
 
-<div {% if field_class %}class="{{ field_class }}"{% endif %}{% if flat_attrs %} {{ flat_attrs }}{% endif %}>
+<div {% if field_class %}class="{{ field_class }}"{% endif %}>
 
     {% for group, options, index in field|optgroups %}
     {% if group %}<strong>{{ group }}</strong>{% endif %}
diff --git a/crispy_bootstrap4/templates/bootstrap4/layout/radioselect.html b/crispy_bootstrap4/templates/bootstrap4/layout/radioselect.html
index 775b711..44bd0c2 100644
--- a/crispy_bootstrap4/templates/bootstrap4/layout/radioselect.html
+++ b/crispy_bootstrap4/templates/bootstrap4/layout/radioselect.html
@@ -1,7 +1,7 @@
 {% load crispy_forms_filters %}
 {% load l10n %}
 
-<div {% if field_class %}class="{{ field_class }}"{% endif %}{% if flat_attrs %} {{ flat_attrs }}{% endif %}>
+<div {% if field_class %}class="{{ field_class }}"{% endif %}>
 
     {% for group, options, index in field|optgroups %}
     {% if group %}<strong>{{ group }}</strong>{% endif %}


Test patch:
diff --git a/tests/results/bootstrap4/test_layout/test_fundamentals_example.html b/tests/results/bootstrap4/test_layout/test_fundamentals_example.html
index 5e3f516..cabada2 100644
--- a/tests/results/bootstrap4/test_layout/test_fundamentals_example.html
+++ b/tests/results/bootstrap4/test_layout/test_fundamentals_example.html
@@ -2,7 +2,7 @@
     <input type="hidden" name="csrfmiddlewaretoken" value="NotARealToken"> 
     <div id="div_id_like_website" class="form-group">
         <label class=" requiredField"> Do you like this website?<span class="asteriskField">*</span> </label>
-        <div action="submit_survey" class="blueForms" id="id-exampleForm">
+        <div>
             <div class="custom-control custom-radio">
                 <input type="radio" class="custom-control-input" name="like_website" value="1" id="id_like_website_0" required checked /> <label class="custom-control-label" for="id_like_website_0"> Yes </label>
             </div>
diff --git a/tests/test_layout_objects.py b/tests/test_layout_objects.py
index be3a896..61610c2 100644
--- a/tests/test_layout_objects.py
+++ b/tests/test_layout_objects.py
@@ -417,7 +417,7 @@ def test_multiplecheckboxes(self):
         test_form.helper[1].wrap(InlineCheckboxes, inline=True)
         html = render_crispy_form(test_form)
 
-        assert html.count('inline="True"') == 4
+        assert html.count('inline="True"') == 3
         assert html.count('custom-control-inline"') == 3
 
     def test_multiple_checkboxes_unique_ids(self):