diff options
author | Patricio Cano <patricio@gitlab.com> | 2014-10-28 20:48:20 +0300 |
---|---|---|
committer | Patricio Cano <patricio@gitlab.com> | 2014-10-28 20:48:20 +0300 |
commit | d9023da90d3d723bcb9ba372b0b89a8747aca6af (patch) | |
tree | e93c1b969db281bacf9439e4251c64bb222983ad /app | |
parent | bf07fcf06ad7a5d2fd5f25079ce9e16d003481c7 (diff) |
Refactored password_strength configuration
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/password_strength.js.coffee | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/app/assets/javascripts/password_strength.js.coffee b/app/assets/javascripts/password_strength.js.coffee index 33b4d2e0f69..825f5630266 100644 --- a/app/assets/javascripts/password_strength.js.coffee +++ b/app/assets/javascripts/password_strength.js.coffee @@ -4,29 +4,25 @@ overwritten_messages = overwritten_rules = wordSequences: false + +options = + showProgressBar: false + showVerdicts: false + showPopover: true + showErrors: true + showStatus: true + errorMessages: overwritten_messages $(document).ready -> profileOptions = {} - profileOptions.ui = - showProgressBar: false - showVerdicts: false - showPopover: true - showErrors: true - showStatus: true - errorMessages: overwritten_messages + profileOptions.ui = options profileOptions.rules = activated: overwritten_rules deviseOptions = {} deviseOptions.common = usernameField: "#user_username" - deviseOptions.ui = - showPopover: true - showErrors: true - showVerdicts: false - showProgressBar: false - showStatus: true - errorMessages: overwritten_messages + deviseOptions.ui = options deviseOptions.rules = activated: overwritten_rules |