<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2010 %> <% disabled_text = 'disabled="true"' if @view_only form_id = "edit_system_settings_#{@system_setting.id}" %> <% fields_for @ldap_servers do |form| %> <% if @ldap_servers.password.nil? || @ldap_servers.password == "" %> <%= hidden_field_tag 'ldap_server_password', "" %> <% else %> <%= hidden_field_tag 'ldap_server_password', "set" %> <% end %>
<%= form.label :host, t_label('system_settings.edit_ldap_config.ldap_host'), :class => "email-sender-address-label item-label" %>
<%= form.text_field :host, :disabled => @view_only, :class => "x-form-field email-server-timeout-field" %>

<%= t('system_settings.edit_ldap_config.ldap_host_caption') %>

<%= form.label :port, t_label('system_settings.edit_ldap_config.ldap_port') %>
<%= form.spinner :port, :minValue => 0, :maxValue => 65535, :allowBlank => false, :disabled => @view_only, :class => "email-server-port-field" %>

<%= t 'system_settings.edit_ldap_config.ldap_port_caption' %>

<%= form.label :use_ssl, t_label('system_settings.edit_ldap_config.use_ssl') %>
<%= form.check_box :use_ssl, :disabled => @view_only %>

<%= t 'system_settings.edit_ldap_config.use_ssl_caption'%>

<%= form.label :admin_username, t_label('system_settings.edit_ldap_config.ldap_admin_username'), :class => "email-sender-address-label item-label" %>
<%= form.text_field :admin_username, :disabled => @view_only, :class => "x-form-field email-server-timeout-field" %>

<%= t('system_settings.edit_ldap_config.ldap_admin_username_example') %>

<%= t('system_settings.edit_ldap_config.ldap_admin_username_caption') %>

<%= form.label :password, t_label("system_settings.edit_ldap_config.ldap_admin_pass"), :class => "password-label item-label" %>

<%= t('system_settings.edit_ldap_config.password_caption') %>

<%= form.label :confirm_password, t_label("system_settings.edit_ldap_config.ldap_admin_pass_confirm"), :class => "confirm-password-label item-label" %>

<%= t('system_settings.edit_ldap_config.confirm_password_caption') %>

<%= button_to_function(t('system_settings.edit_ldap_config.ldap_verify_config'), "try {helpsys.CntMgr.getController('#{form_id}').verifyLDAP();} catch(e) {console.log(e);};return false;") %>
<%= form.label :default_context, t_label('system_settings.edit_ldap_config.default_context'), :class => "email-sender-address-label item-label" %>
<%= form.text_field :default_context, :disabled => @view_only, :class => "x-form-field email-server-timeout-field" %>

<%= t('system_settings.edit_ldap_config.default_context_caption') %>

<%= t('system_settings.edit_ldap_config.default_context_example') %>

<%= t 'system_settings.edit_ldap_config.field_names_label' %>
<%= form.label :user_id_field, t_label('system_settings.edit_ldap_config.ldap_user_id') %>
<%= form.text_field :user_id_field, :disabled => @view_only, :class => "x-form-field email-server-address-field" %>

<%= t 'system_settings.edit_ldap_config.ldap_user_id_caption' %>

<%= form.label :email_address_field, t_label('system_settings.edit_ldap_config.ldap_email') %>
<%= form.text_field :email_address_field, :disabled => @view_only, :class => "x-form-field email-server-address-field" %>

<%= t 'system_settings.edit_ldap_config.ldap_email_caption' %>

<%= form.label :group_field, t_label('system_settings.edit_ldap_config.ldap_group_member') %>
<%= form.text_field :group_field, :disabled => @view_only, :class => "x-form-field email-server-address-field" %>

<%= t 'system_settings.edit_ldap_config.ldap_group_member_caption' %>

<% end %>