summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-03 11:48:11 +0100
committerPhil Hughes <me@iamphill.com>2016-06-03 11:48:11 +0100
commit57a3f2845653da1926ea38c061db0b9b08b2902a (patch)
tree8d853b679be541906efc91c7e4194caa9b4a7512
parent3f4ac2ff60c9d83ec65b19070e4d054e12e67dd2 (diff)
downloadgitlab-ce-password-min-length-placeholder.tar.gz
Added minimum password length to password fieldpassword-min-length-placeholder
Closes #17765
-rw-r--r--app/controllers/sessions_controller.rb1
-rw-r--r--app/views/devise/shared/_signup_box.html.haml2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index d68c2a708e3..c1b940bf9e5 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -14,6 +14,7 @@ class SessionsController < Devise::SessionsController
before_action :load_recaptcha
def new
+ set_minimum_password_length
if Gitlab.config.ldap.enabled
@ldap_servers = Gitlab::LDAP::Config.servers
else
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index 510215bb8cd..905a8dbcd84 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -16,7 +16,7 @@
%div
= f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
.form-group.append-bottom-20#password-strength
- = f.password_field :password, class: "form-control bottom", placeholder: "Password", required: true
+ = f.password_field :password, class: "form-control bottom", placeholder: "Password - minimum length #{@minimum_password_length} characters", required: true, pattern: ".{#{@minimum_password_length},}", title: "Minimum length is #{@minimum_password_length} characters"
%div
- if current_application_settings.recaptcha_enabled
= recaptcha_tags