Connection Settings

<%= f.label :name, 'Name' %> * <%= f.text_field :name, size: 30, required: true %>

<%= f.label :host, 'Host' %> * <%= f.text_field :host, size: 30, required: true, placeholder: 'ldap.example.com or IP' %>

<%= f.label :port, 'Port' %> * <%= f.number_field :port, value: (@ldap.port || 389), min: 1, max: 65535, required: true %>

<%= f.label :tls, 'LDAPS (TLS)' %> <%= f.check_box :tls %> (Use port 636 for LDAPS)

<%= f.label :verify_peer, 'Verify SSL Certificate' %> <%= f.check_box :verify_peer %>

<%= f.label :timeout, 'Timeout (seconds)' %> <%= f.number_field :timeout, value: (@ldap.timeout || 20), min: 1, max: 300 %>

Bind Credentials

<%= f.label :account, 'Bind DN' %> <%= f.text_field :account, size: 60, placeholder: 'uid=admin,cn=users,cn=accounts,dc=example,dc=com' %> (Leave empty for anonymous bind)

<%= f.label :account_password, 'Bind Password' %> <%= f.password_field :account_password, size: 30, autocomplete: 'off' %>

Search Settings

<%= f.label :base_dn, 'Base DN' %> * <%= f.text_field :base_dn, size: 60, placeholder: 'cn=users,cn=accounts,dc=example,dc=com' %>

<%= f.label :filter, 'LDAP Filter' %> <%= f.text_field :filter, size: 60, placeholder: '(objectClass=person)' %>

<%= f.label :onthefly_register, 'On-the-fly user creation' %> <%= f.check_box :onthefly_register, checked: true %> (Automatically create Redmine user on first login)

Attribute Mapping

<%= f.label :attr_login, 'Login attribute' %> * <%= f.text_field :attr_login, size: 30, placeholder: 'uid' %> (uid for LDAP, sAMAccountName for AD)

<%= f.label :attr_firstname, 'First name attribute' %> * <%= f.text_field :attr_firstname, size: 30, placeholder: 'givenName' %>

<%= f.label :attr_lastname, 'Last name attribute' %> * <%= f.text_field :attr_lastname, size: 30, placeholder: 'sn' %>

<%= f.label :attr_mail, 'Email attribute' %> * <%= f.text_field :attr_mail, size: 30, placeholder: 'mail' %>