Commit 348ba1ac authored by Johan Cwiklinski's avatar Johan Cwiklinski
Browse files

Fixes

parent 84acb23e
......@@ -15,7 +15,6 @@
{% set size = null %}
{% set propname = entry.propname %}
{% set value = null %}
{% set checked = null %}
{% set example = null %}
{% if entry.type == constant('Galette\\Entity\\FieldsConfig::TYPE_BOOL') %}
......@@ -101,10 +100,6 @@
{% set value = attribute(member, propname) %}
{% endif %}
{% if masschange is not defined %}
{% set masschange = false %}
{% endif %}
{% include "components/forms/" ~ template with {
name: entry.field_id,
id: entry.field_id,
......@@ -117,8 +112,8 @@
size: size,
tip: tip,
compile_id: "input_" ~ entry.field_id,
checked: checked,
masschange: masschange
checked: checked ?? false,
masschange: masschange ?? false
} %}
{% endfor %}
{% if groups is defined and groups|length != 0 and loop.last and (masschange is not defined or masschange == false) %}
......
......@@ -7,10 +7,13 @@
title: _T("Is member a company?"),
tip: _T("Do you manage a non profit organization, or a company? If you do so, check the box, and then enter its name in the field that will appear."),
checked: member.isCompany(),
component_class: "field"
}
%}
<div class="field">
{% if not member.isCompany() %}
{% set component_class = component_class ?? 'inline field' ~ ' hidden' %}
{% endif %}
{% include "components/forms/text.html.twig" with {
name: entry.field_id,
id: entry.field_id,
......@@ -19,7 +22,7 @@
disabled: entry.disabled,
label: entry.label,
component_id: "company_field",
component_class: "{% if not member.isCompany() %}hidden{% endif %}"
component_class: component_class ?? 'inline field'
}
%}
</div>
......
......@@ -3,7 +3,7 @@
{% block component %}
{% set type = "text" %}
{% set example = _T("(yyyy-mm-dd format)") %}
{% if id == 'ddn_adh' %}
{% if id == 'ddn_adh' and member.id != '' and member.birthdate != '' %}
{% set example = _T("(yyyy-mm-dd format)") ~ "<span id=\"member_age\">" ~ member.getAge() ~ "</span>" %}
{% endif %}
{{ parent() }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment