Fix that the ldap port does not change when updating the encryption to use
fixes #8958
This commit is contained in:
parent
dc4d1246a9
commit
62bb35a71e
|
@ -27,6 +27,10 @@ class LdapResourceForm extends Form
|
||||||
*/
|
*/
|
||||||
public function createElements(array $formData)
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
|
$defaultPort = ! array_key_exists('encryption', $formData) || $formData['encryption'] !== Connection::LDAPS
|
||||||
|
? 389
|
||||||
|
: 636;
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'name',
|
'name',
|
||||||
|
@ -53,9 +57,10 @@ class LdapResourceForm extends Form
|
||||||
'port',
|
'port',
|
||||||
array(
|
array(
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'preserveDefault' => true,
|
||||||
'label' => $this->translate('Port'),
|
'label' => $this->translate('Port'),
|
||||||
'description' => $this->translate('The port of the LDAP server to use for authentication'),
|
'description' => $this->translate('The port of the LDAP server to use for authentication'),
|
||||||
'value' => 389
|
'value' => $defaultPort
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
|
|
Loading…
Reference in New Issue