Skip to content

Commit

Permalink
cv fix and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedricverl committed Dec 17, 2021
1 parent 5ba1cd6 commit 4c00931
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
17 changes: 17 additions & 0 deletions module/BrBundle/Form/Cv/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ public function init()

list($currentYear, $allYears) = $this->getYears();

$this->add(array(
'type'=>'fieldset',
'name'=>'personal',
'label'=>'Personal',
'elements'=>array(
array(
'type' => 'textarea',
'name' => 'email',
'label' => 'E-mail',
'required' => false,
),

),

)
);

$this->add(array(
'type' => 'fieldset',
'name' => 'studies',
Expand Down
4 changes: 2 additions & 2 deletions module/BrBundle/Hydrator/Cv/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function doHydrate(array $data, $object = null)
->setBirthday($person->getBirthDay())
->setSex($person->getSex())
->setPhoneNumber($person->getPhoneNumber())
->setEmail($person->getPersonalEmail())
->setEmail($data['personal']['email'])
->setPriorStudy($data['studies']['prior_degree'])
->setPriorGrade($data['studies']['prior_grade'] * 100)
->setStudy($this->getEntityManager()
Expand Down Expand Up @@ -141,7 +141,7 @@ protected function doExtract($object = null)
}

$data = array();

$data['personal']['email'] = $object->getEmail();
$data['studies']['prior_degree'] = $object->getPriorStudy();
$data['studies']['prior_grade'] = $object->getPriorGrade() / 100;
$data['studies']['degree'] = $object->getStudy()->getId();
Expand Down
2 changes: 1 addition & 1 deletion module/BrBundle/Resources/translations/cv.en.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'Grade for the Prior Degree (e.g. 65.48)' => 'Grade for the Previous Degree (e.g. 65.48)',
'(Provisional) Grade for the Current Degree (e.g. 65.48)' => '(Provisional) Grade for the Current Degree (e.g. 65.48)',
'Extra Information (Year Abroad, Born Outside Belgium, ...)' => 'Extra Information (Year Abroad, Born Outside Belgium, ...)',
'You are advised to use your mother tongue for your CV.' => 'You are advised to use your mother tongue for your CV. You can select your language from the menu.',
'You are advised to use your mother tongue for your CV.' => 'You are advised to fill in your CV in English.',

'Additional Diplomas' => 'Additional Diplomas',
'Experiences' => 'Experiences',
Expand Down
2 changes: 1 addition & 1 deletion module/BrBundle/Resources/translations/cv.nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
'Grade for the Prior Degree (e.g. 65.48)' => 'Percentage voor het Vorige Diploma (bv. 65.48)',
'(Provisional) Grade for the Current Degree (e.g. 65.48)' => '(Voorlopig) Percentage voor het Huidige Diploma (bv. 65.48)',
'Extra Information (Year Abroad, Born Outside Belgium, ...)' => 'Extra Informatie (Jaar in het Buitenland, Geboren Buiten België, ...)',
'You are advised to use your mother tongue for your CV.' => 'We raden je aan om je moedertaal te gebruiken voor je CV. Je kunt de taal in het menu selecteren.',
'You are advised to use your mother tongue for your CV.' => 'We raden je aan om je CV in het Engels in te vullen.',

'Additional Diplomas' => 'Extra Diploma\'s',
'Experiences' => 'Ervaringen',
Expand Down
6 changes: 3 additions & 3 deletions module/BrBundle/Resources/views/br/cv/cv.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
<dt>{{ translate('Sex') }}</dt>
<dd>{{ authenticatedPerson.getSex()|capitalize }}&nbsp;</dd>
<dt>{{ translate('Phone Number') }}</dt>
<dd>{{ authenticatedPerson.getPhoneNumber() }}&nbsp;</dd>
<dt>{{ translate('Email') }}</dt>
<dd>{{ authenticatedPerson.getPersonalEmail() }}&nbsp;</dd>
{# <dd>{{ authenticatedPerson.getPhoneNumber() }}&nbsp;</dd>#}
{# <dt>{{ translate('Email') }}</dt>#}
{# <dd>{{ authenticatedPerson.getPersonalEmail() }}&nbsp;</dd>#}
<dt>{{ translate('Address') }}</dt>
<dd>
{{ authenticatedPerson.getSecondaryAddress().getStreet() }} {{ authenticatedPerson.getSecondaryAddress().getNumber() }}
Expand Down

0 comments on commit 4c00931

Please sign in to comment.