Skip to content

Commit

Permalink
Introduce nolabel for forms elements
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 1, 2024
1 parent 7c9b1ed commit 418b92e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions galette/templates/default/components/forms/input.html.twig
Expand Up @@ -28,17 +28,15 @@
{% endif %}
{% if type is defined and type == 'checkbox' %}
<div class="ui toggle{% if checked is defined and checked == true %} checked{% endif %} right aligned checkbox">
{% else %}
{% elseif nolabel is not defined or nolabel != true %}
{% block label %}
{% if label is defined %}
<label for="{{ id }}"{% if title is defined %} title="{{ title }}"{% endif %}{% if labelclass is defined %} class="{% if labelclass is defined %}{{ labelclass }}{% endif %}"{% endif %}>
{% if masschange ?? false %}
{# Add a checkbox for fields to change on mass edition #}
<input type="checkbox" name="mass_{{ entry.field_id }}" class="mass_checkbox"/>
{% endif %}
{{ label }}
</label>
{% endif %}
{% endblock %}
{% endif %}
{% if type is defined and type == 'password' %}
Expand Down
Expand Up @@ -64,7 +64,8 @@
{% include "components/forms/select.html.twig" with {
id: 'cotis_extension',
value: constant("Galette\\Entity\\ContributionsTypes::DEFAULT_TYPE"),
values: cotisextensions
values: cotisextensions,
nolabel: true
} %}
</td>
<td class="center actions_row">
Expand Down

0 comments on commit 418b92e

Please sign in to comment.