diff --git a/CHANGELOG.md b/CHANGELOG.md index 990d07c7..1b26b045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v4.0.9 +## 06/03/2020 + +1. [](#bugfix) + * Fixed bad `id` attribute on `checkbox` field [#421](https://github.com/getgrav/grav-plugin-form/issues/421) + * Show the `description` span even for an empty description [#313](https://github.com/getgrav/grav-plugin-form/pull/313) + # v4.0.8 ## 04/30/2020 diff --git a/blueprints.yaml b/blueprints.yaml index 481f83af..e4992c16 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,7 +1,7 @@ name: Form slug: form type: plugin -version: 4.0.8 +version: 4.0.9 testing: false description: Enables the forms handling icon: check-square diff --git a/templates/forms/fields/checkbox/checkbox.html.twig b/templates/forms/fields/checkbox/checkbox.html.twig index 83c44601..79bf8551 100644 --- a/templates/forms/fields/checkbox/checkbox.html.twig +++ b/templates/forms/fields/checkbox/checkbox.html.twig @@ -4,7 +4,7 @@ {% endblock %} {% block input %} - {% set id = field.id|default(field.name) ~ '-' ~ key %} + {% set id = field.id|default(field.name)|hyphenize %}
{% endblock %} {% endblock %} - {% if field.description %} + {% if field.description is defined %}
{{ form_field_description|raw }} @@ -49,4 +49,4 @@
{% endblock %}
-{% endblock %} \ No newline at end of file +{% endblock %}