mirror of https://github.com/xwiki-labs/cryptpad
Fix browser autocomplete issues
This commit is contained in:
parent
3a5b66e5d9
commit
7c85728e07
|
@ -39,6 +39,7 @@ define([
|
|||
type: 'password',
|
||||
'name': 'password',
|
||||
placeholder: Msg.login_password,
|
||||
autocomplete: "current-password"
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
|
|
|
@ -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"
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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') ?
|
||||
|
|
|
@ -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
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue