summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/password_strength.js.coffee6
-rw-r--r--app/assets/stylesheets/sections/profile.scss12
-rw-r--r--app/views/devise/passwords/edit.html.haml2
-rw-r--r--app/views/profiles/passwords/new.html.haml2
-rw-r--r--features/steps/profile/profile.rb2
5 files changed, 16 insertions, 8 deletions
diff --git a/app/assets/javascripts/password_strength.js.coffee b/app/assets/javascripts/password_strength.js.coffee
index 696a5ccf0b9..7f4a9180ae9 100644
--- a/app/assets/javascripts/password_strength.js.coffee
+++ b/app/assets/javascripts/password_strength.js.coffee
@@ -7,10 +7,11 @@ overwritten_rules =
$(document).ready ->
profileOptions = {}
profileOptions.ui =
- container: "#password-strength"
- showVerdictsInsideProgressBar: true
+ showProgressBar: false
+ showVerdicts: false
showPopover: true
showErrors: true
+ showStatus: true
errorMessages: overwritten_messages
profileOptions.rules =
activated: overwritten_rules
@@ -19,7 +20,6 @@ $(document).ready ->
deviseOptions.common =
usernameField: "#user_username"
deviseOptions.ui =
- container: "#password-strength"
showPopover: true
showErrors: true
showVerdicts: false
diff --git a/app/assets/stylesheets/sections/profile.scss b/app/assets/stylesheets/sections/profile.scss
index 2c2af7f52c5..fce0a703a0a 100644
--- a/app/assets/stylesheets/sections/profile.scss
+++ b/app/assets/stylesheets/sections/profile.scss
@@ -117,6 +117,14 @@
margin-bottom: 0;
}
-.progress {
- margin-top: 10px;
+.has-success input {
+ background-color: #C3FF88 !important;
+}
+
+.has-error input {
+ background-color: #FFA0A0 !important;
+}
+
+.has-warning input {
+ background-color: #FFEC8B !important;
}
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index f6cbf9b82ba..182ca5e774b 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -6,7 +6,7 @@
.devise-errors
= devise_error_messages!
= f.hidden_field :reset_password_token
- .form-group#password-strength
+ .form-group
= f.password_field :password, class: "form-control top", id: "user_password_recover", placeholder: "New password", required: true
%div
= f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
diff --git a/app/views/profiles/passwords/new.html.haml b/app/views/profiles/passwords/new.html.haml
index 746b3a721e1..42d2d0db29c 100644
--- a/app/views/profiles/passwords/new.html.haml
+++ b/app/views/profiles/passwords/new.html.haml
@@ -14,7 +14,7 @@
.form-group
= f.label :current_password, class: 'control-label'
.col-sm-10= f.password_field :current_password, required: true, class: 'form-control'
- .form-group#password-strength
+ .form-group
= f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, required: true, class: 'form-control', id: 'user_password_profile'
.form-group
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index 0f7f33fe8ce..7d3bea7878e 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -146,7 +146,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step 'I submit new password' do
fill_in :user_current_password, with: '12345678'
- fill_in :user_password, with: '12345678'
+ fill_in :user_password_profile, with: '12345678'
fill_in :user_password_confirmation, with: '12345678'
click_button "Set new password"
end