mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
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)
|
||||
{
|
||||
$defaultPort = ! array_key_exists('encryption', $formData) || $formData['encryption'] !== Connection::LDAPS
|
||||
? 389
|
||||
: 636;
|
||||
|
||||
$this->addElement(
|
||||
'text',
|
||||
'name',
|
||||
@ -52,10 +56,11 @@ class LdapResourceForm extends Form
|
||||
'number',
|
||||
'port',
|
||||
array(
|
||||
'required' => true,
|
||||
'label' => $this->translate('Port'),
|
||||
'description' => $this->translate('The port of the LDAP server to use for authentication'),
|
||||
'value' => 389
|
||||
'required' => true,
|
||||
'preserveDefault' => true,
|
||||
'label' => $this->translate('Port'),
|
||||
'description' => $this->translate('The port of the LDAP server to use for authentication'),
|
||||
'value' => $defaultPort
|
||||
)
|
||||
);
|
||||
$this->addElement(
|
||||
|
Loading…
x
Reference in New Issue
Block a user