diff --git a/application/forms/Config/Authentication/AutologinBackendForm.php b/application/forms/Config/Authentication/AutologinBackendForm.php index 757db4b70..0a53de6bd 100644 --- a/application/forms/Config/Authentication/AutologinBackendForm.php +++ b/application/forms/Config/Authentication/AutologinBackendForm.php @@ -31,7 +31,9 @@ class AutologinBackendForm extends Form array( 'required' => true, 'label' => t('Backend Name'), - 'description' => t('The name of this authentication backend'), + 'description' => t( + 'The name of this authentication provider that is used to differentiate it from others' + ), 'validators' => array( array( 'Regex', @@ -50,8 +52,8 @@ class AutologinBackendForm extends Form 'text', 'strip_username_regexp', array( - 'label' => t('Backend Domain Pattern'), - 'description' => t('The domain pattern of this authentication backend'), + 'label' => t('Filter Pattern'), + 'description' => t('The regular expression to use to strip specific parts off from usernames. Leave empty if you do not want to strip off anything'), 'value' => '/\@[^$]+$/', 'validators' => array( new Zend_Validate_Callback(function ($value) { diff --git a/application/forms/Config/Authentication/DbBackendForm.php b/application/forms/Config/Authentication/DbBackendForm.php index de86d8b24..17bf9a5fd 100644 --- a/application/forms/Config/Authentication/DbBackendForm.php +++ b/application/forms/Config/Authentication/DbBackendForm.php @@ -54,7 +54,9 @@ class DbBackendForm extends Form array( 'required' => true, 'label' => t('Backend Name'), - 'description' => t('The name of this authentication provider'), + 'description' => t( + 'The name of this authentication provider that is used to differentiate it from others' + ), ) ); $this->addElement( diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index 3d4e3cdf3..61ed4c3f3 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -55,7 +55,9 @@ class LdapBackendForm extends Form array( 'required' => true, 'label' => t('Backend Name'), - 'description' => t('The name of this authentication backend') + 'description' => t( + 'The name of this authentication provider that is used to differentiate it from others' + ) ) ); $this->addElement( diff --git a/application/forms/Setup/AuthBackendPage.php b/application/forms/Setup/AuthBackendPage.php index 12d3e3f7d..9439e0b0f 100644 --- a/application/forms/Setup/AuthBackendPage.php +++ b/application/forms/Setup/AuthBackendPage.php @@ -59,21 +59,28 @@ class AuthBackendPage extends Form */ public function createElements(array $formData) { + $this->config['type'] = 'autologin'; + if ($this->config['type'] === 'db') { + $note = t( + 'As you\'ve chosen to use a database for authentication all you need ' + . 'to do now is defining a name for your first authentication backend.' + ); + } elseif ($this->config['type'] === 'ldap') { + $note = t( + 'Before you are able to authenticate using the LDAP connection defined earlier you need to' + . ' provide some more information so that Icinga Web 2 is able to locate account details.' + ); + } else { // if ($this->config['type'] === 'autologin' + $note = t( + 'You\'ve chosen to authenticate using a web server\'s mechanism so it may be necessary' + . ' to adjust usernames before any permissions, restrictions, etc. are being applied.' + ); + } + $this->addElement( new Note( 'description', - array( - 'value' => sprintf( - t( - 'Now please enter all configuration details required' - . ' to authenticate using this %s backend.', - 'setup.auth.backend' - ), - $this->config['type'] === 'db' ? t('database', 'setup.auth.backend.type') : ( - $this->config['type'] === 'ldap' ? 'LDAP' : t('autologin', 'setup.auth.backend.type') - ) - ) - ) + array('value' => $note) ) );