From bd47af098fefef968647f7634105b22eb115d4b2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 11 Mar 2012 11:43:27 +0000 Subject: Merged LdapAuthSourceController into AuthSourceController. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9232 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../auth_sources/_form_auth_source_ldap.html.erb | 47 ++++++++++++++++++++++ app/views/auth_sources/edit.html.erb | 3 +- app/views/auth_sources/new.html.erb | 3 +- app/views/ldap_auth_sources/_form.html.erb | 47 ---------------------- 4 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 app/views/auth_sources/_form_auth_source_ldap.html.erb delete mode 100644 app/views/ldap_auth_sources/_form.html.erb (limited to 'app/views') diff --git a/app/views/auth_sources/_form_auth_source_ldap.html.erb b/app/views/auth_sources/_form_auth_source_ldap.html.erb new file mode 100644 index 000000000..3ddf43a9a --- /dev/null +++ b/app/views/auth_sources/_form_auth_source_ldap.html.erb @@ -0,0 +1,47 @@ +<%= error_messages_for 'auth_source' %> + +
+ +

+<%= text_field 'auth_source', 'name' %>

+ +

+<%= text_field 'auth_source', 'host' %>

+ +

+<%= text_field 'auth_source', 'port', :size => 6 %> <%= check_box 'auth_source', 'tls' %> LDAPS

+ +

+<%= text_field 'auth_source', 'account' %>

+ +

+<%= 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]';" %>

+ +

+<%= text_field 'auth_source', 'base_dn', :size => 60 %>

+ +

+<%= text_field 'auth_source', 'filter', :size => 60 %>

+ +

+<%= check_box 'auth_source', 'onthefly_register' %>

+
+ +
<%=l(:label_attribute_plural)%> +

+<%= text_field 'auth_source', 'attr_login', :size => 20 %>

+ +

+<%= text_field 'auth_source', 'attr_firstname', :size => 20 %>

+ +

+<%= text_field 'auth_source', 'attr_lastname', :size => 20 %>

+ +

+<%= text_field 'auth_source', 'attr_mail', :size => 20 %>

+
+ + diff --git a/app/views/auth_sources/edit.html.erb b/app/views/auth_sources/edit.html.erb index e2c99aa3c..87c72724d 100644 --- a/app/views/auth_sources/edit.html.erb +++ b/app/views/auth_sources/edit.html.erb @@ -1,7 +1,6 @@

<%=l(:label_auth_source)%> (<%= h(@auth_source.auth_method_name) %>)

<% form_tag({:action => 'update', :id => @auth_source}, :class => "tabular") do %> - <%= render :partial => 'form' %> + <%= render :partial => auth_source_partial_name(@auth_source) %> <%= submit_tag l(:button_save) %> <% end %> - diff --git a/app/views/auth_sources/new.html.erb b/app/views/auth_sources/new.html.erb index d0b9b1d43..e5b9106bd 100644 --- a/app/views/auth_sources/new.html.erb +++ b/app/views/auth_sources/new.html.erb @@ -1,6 +1,7 @@

<%=l(:label_auth_source_new)%> (<%= h(@auth_source.auth_method_name) %>)

<% form_tag({:action => 'create'}, :class => "tabular") do %> - <%= render :partial => 'form' %> + <%= hidden_field_tag 'type', @auth_source.type %> + <%= render :partial => auth_source_partial_name(@auth_source) %> <%= submit_tag l(:button_create) %> <% end %> diff --git a/app/views/ldap_auth_sources/_form.html.erb b/app/views/ldap_auth_sources/_form.html.erb deleted file mode 100644 index 3ddf43a9a..000000000 --- a/app/views/ldap_auth_sources/_form.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -<%= error_messages_for 'auth_source' %> - -
- -

-<%= text_field 'auth_source', 'name' %>

- -

-<%= text_field 'auth_source', 'host' %>

- -

-<%= text_field 'auth_source', 'port', :size => 6 %> <%= check_box 'auth_source', 'tls' %> LDAPS

- -

-<%= text_field 'auth_source', 'account' %>

- -

-<%= 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]';" %>

- -

-<%= text_field 'auth_source', 'base_dn', :size => 60 %>

- -

-<%= text_field 'auth_source', 'filter', :size => 60 %>

- -

-<%= check_box 'auth_source', 'onthefly_register' %>

-
- -
<%=l(:label_attribute_plural)%> -

-<%= text_field 'auth_source', 'attr_login', :size => 20 %>

- -

-<%= text_field 'auth_source', 'attr_firstname', :size => 20 %>

- -

-<%= text_field 'auth_source', 'attr_lastname', :size => 20 %>

- -

-<%= text_field 'auth_source', 'attr_mail', :size => 20 %>

-
- - -- cgit v1.2.3