Skip to content

Commit

Permalink
Merge branch 'release/4.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 3, 2020
2 parents 6304a48 + d9a857c commit 4f2149b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/checkbox/checkbox.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% endblock %}

{% block input %}
{% set id = field.id|default(field.name) ~ '-' ~ key %}
{% set id = field.id|default(field.name)|hyphenize %}
<div class="{{ form_field_wrapper_classes ?: 'form-input-wrapper' }} {{ field.size }} {{ field.wrapper_classes }}">
<input
{# required attribute structures #}
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/checkboxes/checkboxes.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% block input %}
{% for key, text in field.options %}

{% set id = field.id|default(field.name) ~ '-' ~ key %}
{% set id = field.id|default(field.name)|hyphenize ~ '-' ~ key %}
{% set name = field.use == 'keys' ? key : id %}
{% set val = field.use == 'keys' ? '1' : key %}
{% set checked = (field.use == 'keys' ? value[key] : key in value) %}
Expand Down
4 changes: 2 additions & 2 deletions templates/forms/layouts/field.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
{% endblock %}
{% endblock %}
{% if field.description %}
{% if field.description is defined %}
<div class="{{ form_field_extra_wrapper_classes }}">
<span class="form-description">
{{ form_field_description|raw }}
Expand All @@ -49,4 +49,4 @@
</div>
{% endblock %}
</div>
{% endblock %}
{% endblock %}

0 comments on commit 4f2149b

Please sign in to comment.