How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Admin login and authconfirm autofill/autocomplete



Set the correct 'autocomplete' html attributes on the login form to assist with password manager autofill

Currently we've been patching the admin templates after each upgrade, to correct password manager autofill behaviour.

### in ./admin*/templates/login.tpl

## 'login' form
# The input elements for username and password with the correct autocomplete attributes
- 'username' input should be set to autocomplete="username"
- 'password' input should be set to autocomplete="current-password"

## 'twofa' / 'second factor' form
# Natively does not trigger autofill, correct autocomplete attribute is required
- 'key' input should be set to autocomplete="one-time-code"

# This input element for the OTP 'key' field is a bit harder as the html is inserted from $challengeHtml which looks like is not template driven, So jQuery is used to patch in browser, The code below is inserted in login.tpl right before
--------
#script#
jQuery(document).ready(function() {
jQuery(".login-body input[name=key]").attr("autocomplete","one-time-code").attr("placeholder","passcode")
});
#/script#
--------

### in .admin*/templates/blend/authconfirm.tpl
## 'authconfirm' form
# The input field 'confirmpw' currently triggers a new password prompt/generator
- 'confirmpw' input should be set to autocomplete="current-password"
# This forces the correct action of offering to autofill with the current password

Post the first comment

Login to post a comment.