chrome never autocomplete
This commit is contained in:
parent
7b956d3ca1
commit
d76745cc9f
|
@ -509,7 +509,9 @@ $table->data[2][1] = html_print_select(
|
|||
true
|
||||
);
|
||||
|
||||
echo '<form method="post" id="form_agent" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_agents">';
|
||||
echo '<form method="post" autocomplete="off" id="form_agent" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_agents">';
|
||||
echo html_print_avoid_autocomplete();
|
||||
|
||||
html_print_table($table);
|
||||
|
||||
$nombre_agente = '';
|
||||
|
@ -815,7 +817,8 @@ foreach ($fields as $field) {
|
|||
}
|
||||
|
||||
if ($field['is_password_type']) {
|
||||
$data[1] = html_print_input_text_extended(
|
||||
$data[1] = html_print_input_password_avoid_autocomplete();
|
||||
$data[1] .= html_print_input_text_extended(
|
||||
'customvalue_'.$field['id_field'],
|
||||
$custom_value,
|
||||
'customvalue_'.$field['id_field'],
|
||||
|
|
|
@ -994,12 +994,6 @@ function html_print_select(
|
|||
}';
|
||||
}
|
||||
|
||||
// Hack for not autocomplete never select2 browser.
|
||||
$output .= '$(document).on("focus", ":input", function(){
|
||||
$(this).attr("autocomplete", "new-password");
|
||||
});';
|
||||
$output .= '$("input.select2-input").attr("autocomplete", "new-password");';
|
||||
|
||||
$output .= '</script>';
|
||||
}
|
||||
|
||||
|
@ -4224,6 +4218,33 @@ function html_html2rgb($htmlcolor)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Avoid autocomplete.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function html_print_avoid_autocomplete()
|
||||
{
|
||||
$output = '';
|
||||
$output .= '<input type="text" style="display:none">';
|
||||
$output .= '<input type="password" style="display:none">';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Input password avoid autocomplete.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function html_print_input_password_avoid_autocomplete()
|
||||
{
|
||||
$output = '<input type="text" style="opacity: 0;position: absolute; width: 0px;">';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a magic-ajax control to select the module.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue