0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Added name and email input attributes

This commit is contained in:
Peter Zimon 2020-10-02 15:35:11 +02:00
parent 7721027783
commit 89c7698f79

View file

@ -86,6 +86,22 @@ function InputField({name, id, label, hideLabel, type, value, placeholder, disab
if (isCookiesDisabled()) {
disabled = true;
}
let autocomplete = '';
let autocorrect = '';
let autocapitalize = '';
switch (id) {
case 'input-email':
autocomplete = 'off';
autocorrect = 'off';
autocapitalize = 'off';
break;
case 'input-name':
autocomplete = 'off';
autocorrect = 'off';
break;
default:
break;
}
return (
<section className='gh-portal-input-section'>
<div className='gh-portal-input-labelcontainer'>
@ -103,6 +119,9 @@ function InputField({name, id, label, hideLabel, type, value, placeholder, disab
onKeyDown={e => onKeyDown(e, name)}
onBlur={e => onBlur(e, name)}
disabled={disabled}
autoComplete={autocomplete}
autoCorrect={autocorrect}
autoCapitalize={autocapitalize}
aria-label={label}
/>
</section>