From d046be30cbe0f42651cdf3a4ae7ee234b5d6da5a Mon Sep 17 00:00:00 2001 From: threadinghamt Date: Thu, 16 Mar 2017 16:53:21 +0000 Subject: [PATCH 1/2] Set autocomplete="off" Change autocomplet tag setting to "off" and provide toggle Yes/No for on off in the property settings. --- src/LoginForm/LoginForm.xml | 5 +++++ src/LoginForm/widget/LoginForm.js | 5 +++++ src/LoginForm/widget/templates/LoginForm.html | 4 ++-- .../widget/templates/LoginFormWithoutShowPassword.html | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/LoginForm/LoginForm.xml b/src/LoginForm/LoginForm.xml index fb8b86f..a272712 100644 --- a/src/LoginForm/LoginForm.xml +++ b/src/LoginForm/LoginForm.xml @@ -95,6 +95,11 @@ Behavior When the login fails, clear the username field + + Auto-complete + Behavior + Enables/disables auto-complete functionality on username and pasword input fields + Show/Mask Password Toggle Password diff --git a/src/LoginForm/widget/LoginForm.js b/src/LoginForm/widget/LoginForm.js index 92cab8d..a4f9b39 100644 --- a/src/LoginForm/widget/LoginForm.js +++ b/src/LoginForm/widget/LoginForm.js @@ -74,6 +74,7 @@ define([ dofocus: false, showLoginFailureWarning: false, loginFailureText: "Your account will be blocked for 5 minutes if login with the same username fails thrice!", + autoComplete: false, /** * Password */ @@ -178,6 +179,10 @@ define([ if (this.autoCapitalize && this.convertCase !== "none") { domAttr.set(this.usernameInputNode, "autocapitalize", "on"); } + if (this.autoComplete) { + domAttr.set(this.usernameInputNode, "autocomplete", "on"); + domAttr.set(this.passwordInputNode, "autocomplete", "on"); + } if (this.convertCase === "toLowerCase") { domStyle.set(this.usernameInputNode, "text-transform", "lowercase"); diff --git a/src/LoginForm/widget/templates/LoginForm.html b/src/LoginForm/widget/templates/LoginForm.html index 13ac597..b10cda8 100644 --- a/src/LoginForm/widget/templates/LoginForm.html +++ b/src/LoginForm/widget/templates/LoginForm.html @@ -3,12 +3,12 @@
- +
- +
diff --git a/src/LoginForm/widget/templates/LoginFormWithoutShowPassword.html b/src/LoginForm/widget/templates/LoginFormWithoutShowPassword.html index ac4a295..4457c37 100644 --- a/src/LoginForm/widget/templates/LoginFormWithoutShowPassword.html +++ b/src/LoginForm/widget/templates/LoginFormWithoutShowPassword.html @@ -3,11 +3,11 @@
- +
- +
From 28f8013c25914d992e536f266234c8a7db420053 Mon Sep 17 00:00:00 2001 From: threadinghamt Date: Fri, 17 Mar 2017 08:07:22 +0000 Subject: [PATCH 2/2] Add Auto complete text --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2676f6c..65c1b9d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ For more information on contributing to this repository visit [Contributing to a * *Forgot password microflow* - Microflow being triggered in case of 'forgot password' onclick * *Focus username input field* - Move focus to username field when the form is showed (only use this if it is not done automatically) * *Login Failure Text* - Warning message to show when login fails twice +* *Auto complete* - Enables/disables autocomplete functionality on username and password input field ### Mobile * *Auto capitalize* - Enables/disables auto capitalize functionality on username input field for mobile devices