Commit 240fcda6 authored by enured's avatar enured
Browse files

S13827 Fix for autofill in datetimepicker and all other given text elements....

S13827 Fix for autofill in datetimepicker and all other given text elements. Autofill will be ignored. For password it will give choice to select a generated password.
parent ccbda057
Pipeline #6893 passed with stage
in 1 minute and 52 seconds
......@@ -1493,6 +1493,11 @@ abstract class AbstractBuildForm {
// $attribute .= Support::doAttribute('value', htmlentities($value, ENT_QUOTES, 'UTF-8'), false);
}
// Set for text autocomplete to new-password to ignore autofill and for password to give choice of generated password for user
if($formElement[FE_TYPE] === 'text' || $formElement[FE_TYPE] === 'password') {
$attribute .= Support::doAttribute('autocomplete', 'new-password');
}
$attribute .= HelperFormElement::getAttributeList($formElement, [FE_INPUT_AUTOCOMPLETE, 'autofocus', 'placeholder']);
$formElement[FE_CHECK_PATTERN] = Sanitize::getInputCheckPattern($formElement[FE_CHECK_TYPE], $formElement[FE_CHECK_PATTERN]
......@@ -3232,6 +3237,7 @@ abstract class AbstractBuildForm {
$attribute .= HelperFormElement::getAttributeList($formElement, [FE_INPUT_AUTOCOMPLETE, 'autofocus', 'placeholder']);
$attribute .= Support::doAttribute('data-load', ($formElement[FE_DYNAMIC_UPDATE] === 'yes') ? 'data-load' : '');
$attribute .= Support::doAttribute('title', $formElement[FE_TOOLTIP]);
$attribute .= Support::doAttribute('autocomplete', 'new-password');
$pattern = Sanitize::getInputCheckPattern($formElement[FE_CHECK_TYPE], $formElement[FE_CHECK_PATTERN], '', $sanitizeMessage);
$attribute .= ($pattern === '') ? '' : 'pattern="' . $pattern . '" ';
......
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