adding autocomplete attribute to et2_textbox and et2_passwd and use it in email wizzard/account to stop browser from accidently filling out empty fields

This commit is contained in:
Ralf Becker 2014-08-21 13:06:17 +00:00
parent cfd28ae9a9
commit 868e5e0a38

View File

@ -68,6 +68,12 @@ var et2_textbox = et2_inputWidget.extend(
"type": "string", "type": "string",
"default": et2_no_init, "default": et2_no_init,
"description": "Perl regular expression eg. '/^[0-9][a-f]{4}$/i'" "description": "Perl regular expression eg. '/^[0-9][a-f]{4}$/i'"
},
"autocomplete": {
"name": "Autocomplete",
"type": "string",
"default": "",
"description": "Weither or not browser should autocomplete that field: 'on', 'off', 'default' (use attribute from form)"
} }
}, },
@ -107,6 +113,7 @@ var et2_textbox = et2_inputWidget.extend(
if(this.options.type == "passwd") { if(this.options.type == "passwd") {
this.input.attr("type", "password"); this.input.attr("type", "password");
} }
if (this.options.autocomplete) this.input.attr("autocomplete", this.options.autocomplete);
} }
if(this.options.size) { if(this.options.size) {