Merge branch 'ent-4536-Quitar-el-autocompletado-de-los-campos-personalizados' into 'develop'

Ent 4536 quitar el autocompletado de los campos personalizados

See merge request artica/pandorafms!3811
This commit is contained in:
Daniel Rodriguez 2021-04-06 17:48:14 +00:00
commit 7593fe9f81
1 changed files with 12 additions and 8 deletions

View File

@ -2136,7 +2136,7 @@ function html_print_input_text_extended(
'list',
];
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" ');
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" autocomplete="'.$autocomplete.'"');
if ($readonly && (!is_array($attributes) || !array_key_exists('readonly', $attributes))) {
$output .= 'readonly="readonly" ';
@ -2406,7 +2406,7 @@ function html_print_input_text(
$function='',
$class='',
$onChange='',
$autocomplete='',
$autocomplete='off',
$autofocus=false,
$onKeyDown='',
$formTo='',
@ -2445,10 +2445,6 @@ function html_print_input_text(
$attr['onkeyup'] = $onKeyUp;
}
if ($autocomplete !== '') {
$attr['autocomplete'] = $autocomplete;
}
if ($autofocus === true) {
$attr['autofocus'] = $autofocus;
}
@ -2474,7 +2470,7 @@ function html_print_input_text(
$return,
false,
$function,
'off',
$autocomplete,
$disabled
);
}
@ -2546,6 +2542,10 @@ function html_print_input_email(array $settings):string
$settings['size'] = 255;
}
if (isset($settings['autocomplete']) === false) {
$settings['autocomplete'] = 'off';
}
foreach ($settings as $attribute => $attr_value) {
// Check valid attribute.
if (in_array($attribute, $valid_attrs) === false) {
@ -2632,6 +2632,10 @@ function html_print_input_number(array $settings):string
$settings['maxlength'] = 255;
}
if (isset($settings['autocomplete']) === false) {
$settings['autocomplete'] = 'off';
}
foreach ($settings as $attribute => $attr_value) {
// Check valid attribute.
if (in_array($attribute, $valid_attrs) === false) {
@ -4420,7 +4424,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
((isset($data['function']) === true) ? $data['function'] : ''),
((isset($data['class']) === true) ? $data['class'] : ''),
((isset($data['onChange']) === true) ? $data['onChange'] : ''),
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : ''),
((isset($data['autocomplete']) === true) ? $data['autocomplete'] : 'off'),
((isset($data['autofocus']) === true) ? $data['autofocus'] : false),
((isset($data['onKeyDown']) === true) ? $data['onKeyDown'] : ''),
((isset($data['form']) === true) ? $data['form'] : ''),