Skip to content

Commit

Permalink
Merge pull request #617 from bolt/hotfix/tidy-up-checkbox
Browse files Browse the repository at this point in the history
Minor tweaks to checkbox
  • Loading branch information
bobdenotter committed Sep 9, 2019
2 parents 8c791e8 + 386470c commit c189949
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion templates/_partials/fields/_base.html.twig
Expand Up @@ -58,7 +58,9 @@
{% if not label|default %}
{% set label = field.definition.label|default(field.name|default('unnamed')|ucwords) %}
{% endif %}
{% set label = label|trim(':') ~ ':' %}
{% if type != 'checkbox' %}
{% set label = label|trim(':') ~ ':' %}
{% endif %}

{# Set the placeholder #}
{% if not placeholder|default %}
Expand Down
2 changes: 1 addition & 1 deletion templates/_partials/fields/checkbox.html.twig
Expand Up @@ -3,7 +3,7 @@
{% block field %}
<div class="custom-control custom-checkbox">
{# What the heck is this hidden field for, you might wonder? Well, it's
there to make sure an unchecked checkbox still shows up in the server
here to make sure an unchecked checkbox still shows up in the server
response, so we can handle it there, if present. #}
<input type="hidden" name="{{ name }}" value="0">
<input class="custom-control-input" id="{{ name }}" name="{{ name }}" type="checkbox"
Expand Down

0 comments on commit c189949

Please sign in to comment.