From: Jean-Philippe Lang Date: Sun, 4 Feb 2007 09:37:28 +0000 (+0000) Subject: added a setting option to disable "password lost" functionality X-Git-Tag: 0.4.2~29 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=52c1718ee8d32f9103192e4a16622ec16de67720;p=redmine.git added a setting option to disable "password lost" functionality git-svn-id: http://redmine.rubyforge.org/svn/trunk@231 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/account/login.rhtml b/app/views/account/login.rhtml index a5d31c2ee..9f1e3dc63 100644 --- a/app/views/account/login.rhtml +++ b/app/views/account/login.rhtml @@ -12,7 +12,13 @@

<% end %> -
<% if Setting.self_registration? %><%= link_to l(:label_register), :action => 'register' %> |<% end %> -<%= link_to l(:label_password_lost), :action => 'lost_password' %>

+
+<% links = [] + links << link_to(l(:label_register), :action => 'register') if Setting.self_registration? + links << link_to(l(:label_password_lost), :action => 'password_lost') if Setting.password_lost? +%> +<%= links.join(" | ") %> +

+ \ No newline at end of file diff --git a/app/views/settings/edit.rhtml b/app/views/settings/edit.rhtml index 625daa09a..04bb771e7 100644 --- a/app/views/settings/edit.rhtml +++ b/app/views/settings/edit.rhtml @@ -20,6 +20,9 @@

<%= check_box_tag 'settings[self_registration]', 1, Setting.self_registration? %><%= hidden_field_tag 'settings[self_registration]', 0 %>

+

+<%= check_box_tag 'settings[password_lost]', 1, Setting.password_lost? %><%= hidden_field_tag 'settings[password_lost]', 0 %>

+

<%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB

diff --git a/config/settings.yml b/config/settings.yml index 371209926..54b3a6c4e 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -29,6 +29,8 @@ login_required: default: 0 self_registration: default: 1 +password_lost: + default: 1 attachment_max_size: format: int default: 5120