Commit 850930e3 authored by Patrick Barroca's avatar Patrick Barroca 😁
Browse files

hotline #66282 : register fix libraries select order

parent cd282f0a
- ticket #66282 : Inscription au portail : correction du lien d'activation lorsque le portail est en HTTPS
\ No newline at end of file
......@@ -171,6 +171,8 @@ class ZendAfi_Form_RegisterOptionalLibrary extends ZendAfi_Form_RegisterOptional
protected function _getOptions() {
$options = parent::_getOptions();
$options['multiOptions'] = Class_Bib::findAllLabels();
asort($options['multiOptions']);
return $options;
}
}
......
......@@ -1469,6 +1469,9 @@ class AuthControllerNobodyLoggedAndRegistrationAllowedWithOptionalFieldsRegister
->setCfgModulesPreferences(['fields' => 'library:optional;card_number:required;lastname:optional;firstname:optional'],
'auth', 'register');
$this->fixture('Class_Bib', ['id' => 2, 'libelle' => 'Cran']);
$this->fixture('Class_Bib', ['id' => 3, 'libelle' => 'Annecy']);
$this->dispatch('auth/register', true);
}
......@@ -1480,6 +1483,13 @@ class AuthControllerNobodyLoggedAndRegistrationAllowedWithOptionalFieldsRegister
}
/** @test */
public function libraryShouldBeAlphabeticallyOrdered() {
$this->assertXPathContentContains('//select[@name="id_site"]//option[1]', 'Annecy');
$this->assertXPathContentContains('//select[@name="id_site"]//option[2]', 'Cran');
}
/** @test */
public function cardNumberShouldBeHereAndRequired() {
$this->assertXPath('//input[@type="text"][@name="idabon"]');
......
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