mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add email and mobile number to person: last modif and translations
This commit is contained in:
parent
e9698f2cbc
commit
e96da0c641
@ -119,7 +119,7 @@ class PersonController extends Controller
|
||||
|
||||
if ( ! $form->isValid() ) {
|
||||
$this->get('session')
|
||||
->getFlashBag()->add('error', 'Thp person data provided'
|
||||
->getFlashBag()->add('error', 'The person data provided'
|
||||
. ' are not valid');
|
||||
|
||||
return $this->render('ChillPersonBundle:Person:edit.html.twig',
|
||||
|
@ -56,9 +56,10 @@ class ListPerson implements ListInterface, ExportElementValidatedInterface
|
||||
protected $fields = array(
|
||||
'id', 'firstName', 'lastName', 'birthdate',
|
||||
'placeOfBirth', 'gender', 'memo', 'email', 'phonenumber',
|
||||
'countryOfBirth', 'nationality', 'address_street_address_1',
|
||||
'address_street_address_2', 'address_valid_from', 'address_postcode_label',
|
||||
'address_postcode_code', 'address_country_name', 'address_country_code'
|
||||
'mobilenumber', 'contactInfo', 'countryOfBirth', 'nationality',
|
||||
'address_street_address_1', 'address_street_address_2',
|
||||
'address_valid_from', 'address_postcode_label', 'address_postcode_code',
|
||||
'address_country_name', 'address_country_code'
|
||||
);
|
||||
|
||||
public function __construct(
|
||||
|
@ -33,13 +33,18 @@ Chill\PersonBundle\Entity\Person:
|
||||
email:
|
||||
- Email:
|
||||
groups: [general, creation]
|
||||
message: 'The email "{{ value }}" is not a valid email.'
|
||||
message: 'The email is not valid'
|
||||
checkMX: true
|
||||
phonenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||
groups: [general, creation]
|
||||
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789'
|
||||
mobilenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||
groups: [general, creation]
|
||||
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33623456789'
|
||||
|
||||
|
||||
constraints:
|
||||
|
@ -40,7 +40,7 @@ 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
|
||||
'Contact information: remarks': 'Remarques'
|
||||
'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%'
|
||||
'Spoken languages': 'Langues parlées'
|
||||
|
@ -12,7 +12,9 @@
|
||||
'Closing date can not be null': 'La date de fermeture ne peut être nulle'
|
||||
The date of closing is before the date of opening: La période de fermeture est après la période d'ouverture
|
||||
The birthdate must be before %date%: La date de naissance doit être avant le %date%
|
||||
|
||||
'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789': 'Numéro de téléphone invalide: il doit commencer par le préfixe international précédé de "+", ne comporter que des chiffres et faire moins de 20 caractères. Ex: +31623456789'
|
||||
'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33623456789': 'Numéro de téléphone invalide: il doit commencer par le préfixe international précédé de "+", ne comporter que des chiffres et faire moins de 20 caractères. Ex: +33623456789'
|
||||
'The email is not valid': 'Le courriel n''est pas valide'
|
||||
Two addresses has the same validFrom date: La date de validité est identique à celle d'une autre adresse
|
||||
|
||||
#export list
|
||||
|
@ -66,7 +66,7 @@
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if form.email is defined or form.phonenumber is defined or form.mobilenumber is defined or form.contact_info is defined-%}
|
||||
{%- if form.email is defined or form.phonenumber is defined or form.mobilenumber is defined or form.contactInfo is defined-%}
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'Contact information'|trans }}</h2></legend>
|
||||
{%- if form.email is defined -%}
|
||||
@ -78,8 +78,8 @@
|
||||
{%- 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'}) }}
|
||||
{%- if form.contactInfo is defined -%}
|
||||
{{ form_row(form.contactInfo, {'label': 'Notes on contact information'}) }}
|
||||
{%- endif -%}
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
|
@ -162,7 +162,7 @@ This view should receive those arguments:
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.email == 'visible' or chill_person.fields.phonenumber == 'visible' -%}
|
||||
{%- if chill_person.fields.email == 'visible' or chill_person.fields.phonenumber == 'visible' or chill_person.fields.mobilenumber == 'visible' or chill_person.fields.contact_info == 'visible' -%}
|
||||
<div class="grid-6">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i> {{ 'Contact information'|trans }}</h2>
|
||||
@ -217,8 +217,8 @@ This view should receive those arguments:
|
||||
{% 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>
|
||||
<dt>{{ 'Notes on contact information'|trans }} :</dt>
|
||||
<dd>{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user