Change autocomplete default value for passwd widget from "" to "off"

This commit is contained in:
Hadi Nategh 2015-06-03 09:05:11 +00:00
parent 8f7a05544e
commit e611eed179
3 changed files with 5 additions and 3 deletions

View File

@ -73,7 +73,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
"name": "Autocomplete",
"type": "string",
"default": "",
"description": "Weither or not browser should autocomplete that field: 'on', 'off', 'default' (use attribute from form)"
"description": "Weither or not browser should autocomplete that field: 'on', 'off', 'default' (use attribute from form). Default value for type password is set to off."
},
onkeypress: {
name: "onKeypress",
@ -120,6 +120,8 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
{
case "passwd":
this.input.attr("type", "password");
// Make autocomplete default value off for password field
if (this.options.autocomplete === "") this.options.autocomplete = "off";
break;
case "hidden":
this.input.attr("type", "hidden");

View File

@ -80,7 +80,7 @@
</row>
<row disabled="@is_root">
<description value="Password"/>
<passwd id="password"/>
<passwd id="password" autocomplete="on"/>
</row>
<row disabled="@is_root">
<description/>

View File

@ -295,7 +295,7 @@
</row>
<row>
<description for="sudo[passwd]" value="Password"/>
<passwd id="sudo[passwd]"/>
<passwd id="sudo[passwd]" autocomplete="on"/>
</row>
<row>
<description/>