diff --git a/customize.dist/pages/login.js b/customize.dist/pages/login.js index d3fb04aa8..889bc6b09 100644 --- a/customize.dist/pages/login.js +++ b/customize.dist/pages/login.js @@ -39,6 +39,7 @@ define([ type: 'password', 'name': 'password', placeholder: Msg.login_password, + autocomplete: "current-password" }), ]), ]), diff --git a/customize.dist/pages/register.js b/customize.dist/pages/register.js index df9dd4cd1..3787a01c3 100644 --- a/customize.dist/pages/register.js +++ b/customize.dist/pages/register.js @@ -79,6 +79,7 @@ define([ h('input.form-control#password', { type: 'password', placeholder: Msg.login_password, + autocomplete: "new-password" }), ]), h('div.input-container', [ @@ -86,6 +87,7 @@ define([ h('input.form-control#password-confirm', { type: 'password', placeholder: Msg.login_confirm, + autocomplete: "new-password" }), ]), ]), diff --git a/www/common/common-interface.js b/www/common/common-interface.js index aa1e4d39d..25953f764 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -877,7 +877,7 @@ define([ opts = opts || {}; var attributes = merge({ type: 'password', - autocomplete: 'new-password', // https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values + autocomplete: 'one-time-code', // https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values }, opts); var input = h('input.cp-password-input', attributes); diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 6f1175cee..a0c3d1751 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2527,7 +2527,7 @@ define([ UI.createCheckbox('cp-creation-expire', Messages.creation_expiration, false, { labelAlt: Messages.creation_expiresIn }), - h('span.cp-creation-expire-picker.cp-creation-slider', [ + h('form.cp-creation-expire-picker.cp-creation-slider', { autocomplete: "off" }, [ h('input#cp-creation-expire-val', { type: "number", min: 1, @@ -2789,7 +2789,7 @@ define([ case "month": unit = 3600 * 24 * 30; break; default: unit = 0; } - expireVal = ($('#cp-creation-expire-val').val() || 0) * unit; + expireVal = (Math.min(Number($('#cp-creation-expire-val').val()), 100) || 0) * unit; } // Password var passwordVal = $('#cp-creation-password').is(':checked') ? diff --git a/www/settings/inner.js b/www/settings/inner.js index 40f14d281..e0381c8a5 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -532,7 +532,8 @@ define([ var form = h('div', [ UI.passwordInput({ id: 'cp-settings-delete-account', - placeholder: Messages.settings_changePasswordCurrent + placeholder: Messages.settings_changePasswordCurrent, + autocomplete: 'current-password', }, true), button ]); @@ -676,11 +677,13 @@ define([ }, true), UI.passwordInput({ id: 'cp-settings-change-password-new', - placeholder: Messages.settings_changePasswordNew + placeholder: Messages.settings_changePasswordNew, + autocomplete: 'new-password', }, true), UI.passwordInput({ id: 'cp-settings-change-password-new2', - placeholder: Messages.settings_changePasswordNewConfirm + placeholder: Messages.settings_changePasswordNewConfirm, + autocomplete: 'new-password', }, true), h('button.btn.btn-primary', Messages.settings_changePasswordButton) ]); @@ -939,6 +942,7 @@ define([ pwInput = h('input#cp-mfa-password', { type: 'password', placeholder: Messages.login_password, + autocomplete: 'current-password', }), button ]);