ajout métadonnées membres

This commit is contained in:
2021-06-14 22:30:52 +02:00
parent 41617295c1
commit f827e50431
9 changed files with 270 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
{% extends '@ChillPerson/Household/layout.html.twig' %}
{% block title 'household.Edit member metadata'|trans %}
{% block content %}
<h1>{{ block('title') }}</h1>
{{ form_start(form) }}
{{ form_row(form.commentMembers) }}
<div id="waitingForBirthContainer">
{{ form_row(form.waitingForBirth) }}
</div>
<div id="waitingForBirthDateContainer">
{{ form_row(form.waitingForBirthDate) }}
</div>
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a
href="{{ chill_path_add_return_path('chill_person_household_members', { 'household_id': household.id }) }}"
class="sc-button bt-cancel"
/>
{{ 'Cancel'|trans }}
</a>
</li>
<li>
<button type="submit" class="sc-button bt-save">
{{ 'Save'|trans }}
</button>
</li>
</ul>
{{ form_end(form) }}
{% endblock %}
{% block js %}
{{ encore_entry_script_tags('household_edit_metadata') }}
{% endblock %}

View File

@@ -5,6 +5,20 @@
{% block content %}
<h1>{{ block('title') }}</h1>
{% if household.commentMembers is not empty %}
<blockquote class="chill-user-quote">
{{ household.commentMembers|chill_markdown_to_html }}
</blockquote>
{% endif %}
{% if household.waitingForBirth %}
{% if household.waitingForBirthDate is not null %}
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
{% else %}
{{ 'household.Expecting for birth'|trans }}
{% endif %}
{% endif %}
{% for p in positions %}
<h3>{{ p.label|localize_translatable_string }}</h3>
@@ -139,6 +153,14 @@
{% endfor %}
<ul class="record_actions sticky-form-buttons">
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_members_metadata_edit', { 'household_id': household.id }) }}"
class="sc-button bt-edit"
>
{{ 'household.Edit member metadata'|trans }}
</a>
</li>
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"