summaryrefslogtreecommitdiffstats
path: root/app/views/users/_form.html.erb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-08-29 01:35:09 +0000
committerGo MAEDA <maeda@farend.jp>2019-08-29 01:35:09 +0000
commit35e6a532f56d1a3e54476d2adb36375169e9bef9 (patch)
tree6d225402666ad8aa85b2fe6f9d40c427669368fc /app/views/users/_form.html.erb
parent0d9f7ee64a43ce75dd87c8d035a9d335b1077c16 (diff)
downloadredmine-35e6a532f56d1a3e54476d2adb36375169e9bef9.tar.gz
redmine-35e6a532f56d1a3e54476d2adb36375169e9bef9.zip
Force passwords to contain specified character classes (#4221).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@18411 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/users/_form.html.erb')
-rw-r--r--app/views/users/_form.html.erb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index ce5b1f6c7..bb20a4f9d 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -31,8 +31,13 @@
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {$('#password_fields').show();} else {$('#password_fields').hide();}" %></p>
<% end %>
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>">
- <p><%= f.password_field :password, :required => true, :size => 25 %>
- <em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
+ <p>
+ <%= f.password_field :password, :required => true, :size => 25 %>
+ <em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
+ <% if Setting.password_required_char_classes.any? %>
+ <em class="info"><%= l(:text_characters_must_contain, :character_classes => Setting.password_required_char_classes.collect{|c| l("label_password_char_class_#{c}")}.join(", ")) %></em>
+ <% end %>
+ </p>
<p><%= f.password_field :password_confirmation, :required => true, :size => 25 %></p>
<p><%= f.check_box :generate_password %></p>
<p><%= f.check_box :must_change_passwd %></p>