Commit b41d597c authored by Arthur Suzuki's avatar Arthur Suzuki
Browse files

SIGB Koha PreRegistration : added several private informations fields in pre-registration form.

parent bc3bae5c
Pipeline #6752 passed with stage
in 34 minutes and 36 seconds
- ticket #68507 : Formulaire pré-inscription code postal et ville
\ No newline at end of file
- ticket #68507 : SIGB Koha : ajout des champs numéros dans la voie, ville et téléphone dans le formulaire de préinscription
\ No newline at end of file
......@@ -46,6 +46,11 @@ class ZendAfi_Form_PreRegistration_Koha extends ZendAfi_Form {
['label' => $this->_('Date de naissance'),
'DateFormat' => 'dd-MM-YYYY'])
->addElement('text',
'streetnumber',
['label' => $this->_('Numéro dans la voie'),
'required' => true])
->addElement('text',
'address',
['label' => $this->_('Adresse'),
......@@ -56,11 +61,21 @@ class ZendAfi_Form_PreRegistration_Koha extends ZendAfi_Form {
['label' => $this->_('Code postal'),
'required' => true])
->addElement('text',
'city',
['label' => $this->_('Ville'),
'required' => true])
->addElement('email',
'email',
['label' => $this->_('E-mail'),
'required' => true])
->addElement('text',
'phone',
['label' => $this->_('Téléphone'),
'required' => true])
->addElement('text',
'emailCheck',
['data-spambots' => 'true'])
......@@ -75,12 +90,14 @@ class ZendAfi_Form_PreRegistration_Koha extends ZendAfi_Form {
'identity_fieldset',
['legend' => $this->_('Votre identité')])
->addDisplayGroup(['address',
'zipcode'],
->addDisplayGroup(['streetnumber',
'address',
'zipcode',
'city'],
'address_fieldset',
['legend' => $this->_('Votre adresse')])
->addDisplayGroup(['email', 'emailCheck'],
->addDisplayGroup(['email', 'phone', 'emailCheck'],
'contact_fieldset',
['legend' => $this->_('Information de contact')]);
......
......@@ -137,9 +137,12 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15-09-1940',
'streetnumber' => '10',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'])])
'city' => 'Gotham',
'email' => 'thom@mail.com',
'phone' => '0123456789'])])
->answers(KohaFixtures::successPreRegistration());
$this->postDispatch('auth/pre-registration',
......@@ -147,9 +150,12 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15-09-1940',
'streetnumber' => '10',
'address' => 'rue secret',
'zipcode' => '01630',
'city' => 'Gotham',
'email' => 'thom@mail.com',
'phone' => '0123456789',
'emailCheck' => ''],
true);
}
......@@ -157,7 +163,7 @@ class AuthControllerPreRegistrationKohaPostDispatchTest extends AuthControllerPr
/** @test */
public function responseShouldRedirectToPreRegistration() {
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration-success/branchcode/1%7CGRA/surname/Boulard/firstname/Thom/dateofbirth/15-09-1940/address/rue+secret/zipcode/01630/email/thom%40mail.com');
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration-success/branchcode/1%7CGRA/surname/Boulard/firstname/Thom/dateofbirth/15-09-1940/streetnumber/10/address/rue+secret/zipcode/01630/city/Gotham/email/thom%40mail.com/phone/0123456789');
}
......@@ -207,9 +213,12 @@ class AuthControllerPreRegistrationKohaPostDispatchWithErrorReturnedTest extends
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15-09-1940',
'streetnumber' => '10',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'])])
'city' => 'Gotham',
'email' => 'thom@mail.com',
'phone' => '0123456789'])])
->answers(KohaFixtures::errorPreRegistration());
$this->postDispatch('auth/pre-registration',
......@@ -217,16 +226,19 @@ class AuthControllerPreRegistrationKohaPostDispatchWithErrorReturnedTest extends
'surname' => 'Boulard',
'firstname' => 'Thom',
'dateofbirth' => '15/09/1940',
'streetnumber' => '10',
'address' => 'rue secret',
'zipcode' => '01630',
'email' => 'thom@mail.com'],
'city' => 'Gotham',
'email' => 'thom@mail.com',
'phone' => '0123456789'],
true);
}
/** @test */
public function responseShouldRedirectToPreRegistrationError() {
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration/branchcode/1%7CGRA/surname/Boulard/firstname/Thom/dateofbirth/15%2F09%2F1940/address/rue+secret/zipcode/01630/email/thom%40mail.com');
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration/branchcode/1%7CGRA/surname/Boulard/firstname/Thom/dateofbirth/15%2F09%2F1940/streetnumber/10/address/rue+secret/zipcode/01630/city/Gotham/email/thom%40mail.com/phone/0123456789');
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment