add email and phonenumber: wrote migration file, changed templates, changed validation rules

This commit is contained in:
nobohan
2018-05-18 17:41:33 +02:00
parent 3eb96c4479
commit e9698f2cbc
9 changed files with 118 additions and 16 deletions

View File

@@ -21,7 +21,7 @@
{% block title %}{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %}
<h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1>
{% form_theme form 'ChillMainBundle:Form:fields.html.twig' %}
@@ -66,7 +66,7 @@
</fieldset>
{%- endif -%}
{%- if form.email is defined or form.phonenumber is defined -%}
{%- if form.email is defined or form.phonenumber is defined or form.mobilenumber is defined or form.contact_info is defined-%}
<fieldset>
<legend><h2>{{ 'Contact information'|trans }}</h2></legend>
{%- if form.email is defined -%}
@@ -75,6 +75,12 @@
{%- if form.phonenumber is defined -%}
{{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }}
{%- endif -%}
{%- if form.mobilenumber is defined -%}
{{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }}
{%- endif -%}
{%- if form.contact_info is defined -%}
{{ form_row(form.contact_info, {'label': 'Contact information: remarks'}) }}
{%- endif -%}
</fieldset>
{%- endif -%}
@@ -93,4 +99,4 @@
{{ form_end(form) }}
{% endblock personcontent %}
{% endblock personcontent %}