person: add civility: entity, migration, form, twig, config

This commit is contained in:
nobohan
2021-11-08 11:41:45 +01:00
parent 1dbf29beea
commit fa05a6856a
9 changed files with 112 additions and 4 deletions

View File

@@ -37,6 +37,9 @@
<fieldset>
<legend><h2>{{ 'General information'|trans }}</h2></legend>
{%- if form.civility is defined -%}
{{ form_row(form.civility, {'label' : 'Civility'}) }}
{% endif %}
{{ form_row(form.firstName, {'label' : 'First name'}) }}
{{ form_row(form.lastName, {'label' : 'Last name'}) }}
{% if form.altNames is defined %}

View File

@@ -51,6 +51,15 @@ This view should receive those arguments:
<figure class="person-details">
<h2 class="chill-red">{{ 'General information'|trans }}</h2>
<dl>
{% if person.civility is not null %}
<dt>{{ 'Civility'|trans }}&nbsp;:</dt>
<dd>
{% if person.civility.name|length > 0 %}
{{ person.civility.name|first }}
{% endif %}
</dd>
{% endif %}
<dt>{{ 'First name'|trans }}&nbsp;:</dt>
<dd>{{ person.firstName }}</dd>