Merge branch 'ent-3437-Guardar-user-password-modulos-WMI' into 'develop'

Remove autocomplete user and password in the form to create wmi modules - #3437

See merge request artica/pandorafms!2485
This commit is contained in:
Alejandro Fraguas 2019-06-12 13:03:56 +02:00
commit 1305e267de
2 changed files with 7 additions and 6 deletions

View File

@ -83,8 +83,8 @@ $data[3] = html_print_input_password(
true,
$disabledBecauseInPolicy,
false,
'',
$classdisabledBecauseInPolicy
$classdisabledBecauseInPolicy,
'new-password'
);
push_table_simple($data, 'user_pass');

View File

@ -1233,7 +1233,7 @@ function html_print_extended_select_for_cron($hour='*', $minute='*', $mday='*',
*
* @return string HTML code if return parameter is true.
*/
function html_print_input_text_extended($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return=false, $password=false, $function='')
function html_print_input_text_extended($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return=false, $password=false, $function='', $autocomplete='off')
{
static $idcounter = 0;
@ -1283,7 +1283,7 @@ function html_print_input_text_extended($name, $value, $id, $alt, $size, $maxlen
'autocomplete',
];
$output = '<input '.($password ? 'type="password" autocomplete="off" ' : 'type="text" ');
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" ');
if ($disabled && (!is_array($attributes) || !array_key_exists('disabled', $attributes))) {
$output .= 'readonly="readonly" ';
@ -1435,7 +1435,8 @@ function html_print_input_password(
$return=false,
$disabled=false,
$required=false,
$class=''
$class='',
$autocomplete='off'
) {
if ($maxlength == 0) {
$maxlength = 255;
@ -1454,7 +1455,7 @@ function html_print_input_password(
$attr['class'] = $class;
}
return html_print_input_text_extended($name, $value, 'password-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, true);
return html_print_input_text_extended($name, $value, 'password-'.$name, $alt, $size, $maxlength, $disabled, '', $attr, $return, true, '', $autocomplete);
}