mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
add email and phonenumber: wrote migration file, changed templates, changed validation rules
This commit is contained in:
@@ -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 %}
|
||||
|
@@ -173,7 +173,7 @@ This view should receive those arguments:
|
||||
<dd>
|
||||
{%- if person.lastAddress is not empty -%}
|
||||
{{ address._render(person.lastAddress) }}
|
||||
|
||||
|
||||
<ul class="record_actions record_actions_small">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : person.lastAddress.id } ) }}" class="sc-button has-hidden button-small bt-edit">
|
||||
@@ -196,6 +196,7 @@ This view should receive those arguments:
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
{%- if chill_person.fields.email == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Email'|trans }} :</dt>
|
||||
@@ -208,7 +209,18 @@ This view should receive those arguments:
|
||||
<dd>{% if person.phonenumber is not empty %}<pre>{{ person.phonenumber}}</pre>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
{%- if chill_person.fields.mobilenumber == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||
<dd>{% if person.mobilenumber is not empty %}<pre>{{ person.mobilenumber}}</pre>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{%- if chill_person.fields.contact_info == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Remarks'|trans }} :</dt>
|
||||
<dd>{% if person.contactInfo is not empty %}<blockquote class="chill-user-quote">{{ person.contactInfo|nl2br }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
|
Reference in New Issue
Block a user