From f2b140168093a11ad90742eaf2121f6b15eacb0a Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Thu, 7 Jul 2016 08:03:17 -0400
Subject: Added getStateFromConfig (#3517)

---
 webapp/components/admin_console/password_settings.jsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'webapp/components/admin_console/password_settings.jsx')

diff --git a/webapp/components/admin_console/password_settings.jsx b/webapp/components/admin_console/password_settings.jsx
index 9d335c539..6eacb6011 100644
--- a/webapp/components/admin_console/password_settings.jsx
+++ b/webapp/components/admin_console/password_settings.jsx
@@ -80,6 +80,19 @@ export default class PasswordSettings extends AdminSettings {
         return config;
     }
 
+    getStateFromConfig(config) {
+        return {
+            passwordMinimumLength: config.PasswordSettings.MinimumLength,
+            passwordLowercase: config.PasswordSettings.Lowercase,
+            passwordNumber: config.PasswordSettings.Number,
+            passwordUppercase: config.PasswordSettings.Uppercase,
+            passwordSymbol: config.PasswordSettings.Symbol,
+            maximumLoginAttempts: config.ServiceSettings.MaximumLoginAttempts,
+            enableMultifactorAuthentication: config.ServiceSettings.EnableMultifactorAuthentication,
+            passwordResetSalt: config.EmailSettings.PasswordResetSalt
+        };
+    }
+
     getSampleErrorMsg() {
         if (this.props.config.PasswordSettings.MinimumLength > Constants.MAX_PASSWORD_LENGTH || this.props.config.PasswordSettings.MinimumLength < Constants.MIN_PASSWORD_LENGTH) {
             return (
@@ -161,6 +174,7 @@ export default class PasswordSettings extends AdminSettings {
                                 defaultMessage='Minimum Password Length:'
                             />
                         }
+                        placeholder={Utils.localizeMessage('admin.password.minimumLengthExample', 'Ex "5"')}
                         helpText={
                             <FormattedMessage
                                 id='admin.password.minimumLengthDescription'
-- 
cgit v1.2.3-1-g7c22

