Write none instead of plaintext for unencrypted LDAP resources

This commit is contained in:
Eric Lippmann 2015-03-13 00:47:23 +01:00
parent d8d0d88c95
commit 9f0af662a7

View File

@ -67,17 +67,17 @@ class LdapResourceForm extends Form
'label' => $this->translate('Encryption'), 'label' => $this->translate('Encryption'),
'description' => $this->translate( 'description' => $this->translate(
'Whether to encrypt communication. Choose STARTTLS or LDAPS for encrypted communication or' 'Whether to encrypt communication. Choose STARTTLS or LDAPS for encrypted communication or'
. ' Plaintext for unencrypted communication' . ' none for unencrypted communication'
), ),
'multiOptions' => array( 'multiOptions' => array(
'plaintext' => $this->translate('Plaintext'), 'none' => $this->translate('None'),
Connection::STARTTLS => 'STARTTLS', Connection::STARTTLS => 'STARTTLS',
Connection::LDAPS => 'LDAPS' Connection::LDAPS => 'LDAPS'
) )
) )
); );
if (isset($formData['encryption']) && $formData['encryption'] !== 'plaintext') { if (isset($formData['encryption']) && $formData['encryption'] !== 'none') {
// TODO(jom): Do not show this checkbox unless the connection is actually failing due to certificate errors // TODO(jom): Do not show this checkbox unless the connection is actually failing due to certificate errors
$this->addElement( $this->addElement(
'checkbox', 'checkbox',