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
4b6f5093ab
commit
bc0f8b2c57
@ -1214,6 +1214,8 @@ class etemplate extends boetemplate
|
|||||||
// fall-through
|
// fall-through
|
||||||
case 'passwd' :
|
case 'passwd' :
|
||||||
case 'text': // size: [length][,maxLength[,preg]]
|
case 'text': // size: [length][,maxLength[,preg]]
|
||||||
|
$autocompletion_off='';
|
||||||
|
if ($type == 'passwd') $autocompletion_off='autocomplete="off"';
|
||||||
$cell_opts = explode(',',$cell_options,3);
|
$cell_opts = explode(',',$cell_options,3);
|
||||||
if ($readonly && (int)$cell_opts[0] >= 0)
|
if ($readonly && (int)$cell_opts[0] >= 0)
|
||||||
{
|
{
|
||||||
@ -1223,7 +1225,7 @@ class etemplate extends boetemplate
|
|||||||
{
|
{
|
||||||
if ($cell_opts[0] < 0) $cell_opts[0] = abs($cell_opts[0]);
|
if ($cell_opts[0] < 0) $cell_opts[0] = abs($cell_opts[0]);
|
||||||
$html .= html::input($form_name,$value,$type == 'passwd' ? 'password' : '',
|
$html .= html::input($form_name,$value,$type == 'passwd' ? 'password' : '',
|
||||||
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH'));
|
$options.html::formatOptions($cell_opts,'SIZE,MAXLENGTH').($autocompletion_off?' '.$autocompletion_off:''));
|
||||||
|
|
||||||
if (!$readonly)
|
if (!$readonly)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user