household address: add a form for editing the validFrom date

This commit is contained in:
nobohan
2022-04-01 16:17:04 +02:00
parent de4f65fede
commit 3a3eb68288
4 changed files with 83 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
{% extends '@ChillPerson/Household/layout.html.twig' %}
{% block title 'Edit household address valid from'|trans %}
{% block content %}
<h1>{{ block('title') }}</h1>
<div>
{{ address|chill_entity_render_box}}
</div>
{{ form_start(form) }}
{{ form_errors(form) }}
<div>
{{ form_row(form.validFrom) }}
</div>
<div hidden>
{{ form_rest(form) }}
</div>
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_person_household_addresses', { 'household_id': household.id } ) }}" class="btn btn-cancel">
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock %}

View File

@@ -64,9 +64,12 @@
}) }}
<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>
class="btn btn-edit">
</a>
</li>
</ul>
</div>