fixes on address valid from edit for household

This commit is contained in:
2022-04-14 00:02:52 +02:00
parent 405694a0b4
commit 86ec020f80
6 changed files with 67 additions and 58 deletions

View File

@@ -13,26 +13,7 @@
<div>
{% if minValidFrom is not null and maxValidFrom is not null %}
{{ form_row(form.validFrom, {'attr': {'min': minValidFrom|date('Y-m-d'), 'max': maxValidFrom|date('Y-m-d') }}) }}
{% else %}
{% if minValidFrom is not null %}
{{ form_row(form.validFrom, {'attr': {'min': minValidFrom|date('Y-m-d')}}) }}
{% elseif maxValidFrom is not null %}
{{ form_row(form.validFrom, {'attr': {'max': maxValidFrom|date('Y-m-d')}}) }}
{% else %}
{{ form_row(form.validFrom) }}
{% endif %}
{% endif %}
</div>
<div hidden>
{% if address.isNoAddress %}
{{ form_row(form.street, {'value': ' '})}}
{{ form_row(form.streetNumber, {'value': ' '})}}
{{ form_row(form.postCode)}}
{% else %}
{{ form_rest(form) }}
{% endif %}
{{ form_row(form.validFrom) }}
</div>
<ul class="record_actions sticky-form-buttons">

View File

@@ -62,16 +62,17 @@
'extended_infos': true,
'has_no_address': true
}) }}
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_household_address_valid_from_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
class="btn btn-edit">{{ "edit address valid from"|trans }}
</a>
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
class="btn btn-edit">
</a>
</li>
</ul>
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_household_address_valid_from_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
class="btn btn-edit">{{ "edit address valid from"|trans }}
</a>
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
class="btn btn-edit"></a>
</li>
</ul>
{% endif %}
</div>
<div class="date">