summaryrefslogtreecommitdiffstats
path: root/app/views/auth_sources/_form.rhtml
blob: 3d148c11f744f5020ebb14adadaa54e142466bed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<%= error_messages_for 'auth_source' %>

<div class="box">
<!--[form:auth_source]-->
<p><label for="auth_source_name"><%=l(:field_name)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'name'  %></p>

<p><label for="auth_source_host"><%=l(:field_host)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'host'  %></p>

<p><label for="auth_source_port"><%=l(:field_port)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'port', :size => 6 %> <%= check_box 'auth_source', 'tls'  %> LDAPS</p>

<p><label for="auth_source_account"><%=l(:field_account)%></label>
<%= text_field 'auth_source', 'account'  %></p>

<p><label for="auth_source_account_password"><%=l(:field_password)%></label>
<%= password_field 'auth_source', 'account_password', :name => 'ignore',
                                           :value => ((@auth_source.new_record? || @auth_source.account_password.blank?) ? '' : ('x'*15)),
                                           :onfocus => "this.value=''; this.name='auth_source[account_password]';",
                                           :onchange => "this.name='auth_source[account_password]';" %></p>

<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
</div>

<div class="box">
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
<%= check_box 'auth_source', 'onthefly_register' %></p>

<p>
<fieldset><legend><%=l(:label_attribute_plural)%></legend>
<p><label for="auth_source_attr_login"><%=l(:field_login)%> <span class="required">*</span></label>
<%= text_field 'auth_source', 'attr_login', :size => 20  %></p>

<p><label for="auth_source_attr_firstname"><%=l(:field_firstname)%></label>
<%= text_field 'auth_source', 'attr_firstname', :size => 20  %></p>

<p><label for="auth_source_attr_lastname"><%=l(:field_lastname)%></label>
<%= text_field 'auth_source', 'attr_lastname', :size => 20  %></p>

<p><label for="auth_source_attr_mail"><%=l(:field_mail)%></label>
<%= text_field 'auth_source', 'attr_mail', :size => 20  %></p>
</fieldset>
</p>
</div>
<!--[eoform:auth_source]-->