mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
* Api: use autocomplete=off on all etemplate password fields (not all browsers support that), to avoid filling in wrong passwords while administering
This commit is contained in:
parent
7099d009f4
commit
00a29c8f13
@ -1272,6 +1272,8 @@ class etemplate extends boetemplate
|
||||
case 'hidden':
|
||||
case 'passwd':
|
||||
case 'text': // size: [length][,maxLength[,preg[,html5type]]]
|
||||
$autocompletion_off='';
|
||||
if ($type == 'passwd') $autocompletion_off='autocomplete="off"';
|
||||
$cell_opts = $c = self::csv_split($cell_options); // allows to enclose preg in quote to allow comma
|
||||
// fix preg, in case it contains a comma (html5type is only letters and always last option!)
|
||||
if (count($cell_opts) > 3 && ($cell_opts2 = explode(',',$cell_options)) && $cell_opts2[2][0] != '"')
|
||||
@ -1293,7 +1295,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
if ($cell_opts[0] < 0) $cell_opts[0] = abs($cell_opts[0]);
|
||||
$html .= html::input($form_name,$value,$type == 'passwd' ? 'password' : ($type == 'hidden' ? 'hidden' : $cell_opts[3]),
|
||||
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH').($cell['needed']?' required="required"':''));
|
||||
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH').($cell['needed']?' required="required"':'').($autocompletion_off?' '.$autocompletion_off:''));
|
||||
|
||||
if (!$readonly)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user