Commit 22776aae authored by Nicole Cordes's avatar Nicole Cordes Committed by Susanne Moog
Browse files

[BUGFIX] Set semantic value to autocomplete

To enforce Chrome to respect the disabled autocompletion for fields,
the value of the autocomplete attribute is set to some semantic
value.

Resolves: #75809
Releases: master, 7.6
Change-Id: Ib30fdfe7d7a9ff3f564b8e016331a0706ff0db01
Reviewed-on: https://review.typo3.org/47813


Reviewed-by: default avatarMarkus Sommer <markussom@posteo.de>
Tested-by: default avatarMarkus Sommer <markussom@posteo.de>
Reviewed-by: default avatarSusanne Moog <typo3@susannemoog.de>
Tested-by: default avatarSusanne Moog <typo3@susannemoog.de>
parent dc06bd58
......@@ -120,7 +120,7 @@ class InputColorPickerElement extends AbstractFormElement
}
if (isset($config['autocomplete'])) {
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'off' : 'on';
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'new-' . $fieldName : 'on';
}
// Build the attribute string
......
......@@ -150,7 +150,7 @@ class InputTextElement extends AbstractFormElement
}
if (isset($config['autocomplete'])) {
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'off' : 'on';
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'new-' . $fieldName : 'on';
}
// Build the attribute string
......
......@@ -71,7 +71,7 @@ class RsaInputElement extends AbstractFormElement
case 'password':
$attributes['type'] = 'password';
$attributes['value'] = '********';
$attributes['autocomplete'] = 'off';
$attributes['autocomplete'] = 'new-' . $fieldName;
break;
default:
// @todo: This is ugly: The code should find out on it's own whether a eval definition is a
......@@ -125,7 +125,7 @@ class RsaInputElement extends AbstractFormElement
}
if (isset($config['autocomplete'])) {
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'off' : 'on';
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'new-' . $fieldName : 'on';
}
// Build the attribute string
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment