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
etemplate/js
filemanager/templates/default

View File

@ -73,7 +73,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
"name": "Autocomplete", "name": "Autocomplete",
"type": "string", "type": "string",
"default": "", "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: { onkeypress: {
name: "onKeypress", name: "onKeypress",
@ -120,6 +120,8 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
{ {
case "passwd": case "passwd":
this.input.attr("type", "password"); this.input.attr("type", "password");
// Make autocomplete default value off for password field
if (this.options.autocomplete === "") this.options.autocomplete = "off";
break; break;
case "hidden": case "hidden":
this.input.attr("type", "hidden"); this.input.attr("type", "hidden");

View File

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

View File

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