From cef00005c5a059a3a0bccd676b760aed9fcb97a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sun, 28 Mar 2021 23:39:19 +0200 Subject: [PATCH] fix add other phonenumber rendering --- .../Resources/views/Person/edit.html.twig | 2 +- .../Resources/views/Person/view.html.twig | 11 +++++++++++ .../ChillPersonBundle/translations/messages.fr.yml | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig index b95dbedd9..4546cc56d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig @@ -84,7 +84,7 @@ {{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }} {%- endif -%} {%- if form.otherPhoneNumbers is defined -%} - {{ form_row(form.otherPhoneNumbers) }} + {{ form_widget(form.otherPhoneNumbers) }} {%- endif -%} {%- if form.contactInfo is defined -%} {{ form_row(form.contactInfo, {'label': 'Notes on contact information'}) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index 45c8cd1ed..796a7f82e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -227,6 +227,17 @@ This view should receive those arguments:
{% if person.mobilenumber is not empty %}
{{ person.mobilenumber|chill_format_phonenumber }}
{% else %}{{ 'No data given'|trans }}{% endif %}
{% endif %} + {% for pp in person.otherPhoneNumbers %} +
{{ 'Other phonenumber'|trans }} :
+
+
{{ pp.phoneNumber|chill_format_phonenumber }}
+ {% if pp.description is not empty %} +
+ {{ pp.description|nl2br }} + {% endif %} +
+
+ {% endfor %} {%- if chill_person.fields.contact_info == 'visible' -%}
{{ 'Notes on contact information'|trans }} :
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index f5d1bb0f5..aa940f7ee 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -40,6 +40,10 @@ Phonenumber: 'Numéro de téléphone' phonenumber: numéro de téléphone Mobilenumber: 'Numéro de téléphone portable' mobilenumber: numéro de téléphone portable +Other phonenumber: Autre numéro de téléphone +Description: description +Add new phone: Ajouter un numéro de téléphone +Remove phone: Supprimer 'Notes on contact information': 'Remarques sur les informations de contact' 'Remarks': 'Remarques' '{0} Born the %date% | {1} Born the %date%': '{0} Né le %date% | {1} Née le %date%'