summaryrefslogtreecommitdiff
authorMichael Krelin <hacker@klever.net>2013-11-28 20:04:10 (UTC)
committer Michael Krelin <hacker@klever.net>2013-11-28 20:04:10 (UTC)
commit11a51653179a40dff1ecf13b9b4eb5e073920c04 (patch) (unidiff)
treef3dc8437724ecf8d5967ce61e6734ab89fb58704
parent6cd9e34b5b49473923190a6a70c436908c98505e (diff)
downloadclipperz-11a51653179a40dff1ecf13b9b4eb5e073920c04.zip
clipperz-11a51653179a40dff1ecf13b9b4eb5e073920c04.tar.gz
clipperz-11a51653179a40dff1ecf13b9b4eb5e073920c04.tar.bz2
frontend: turn off autocompletion for input elements in record
otherwise the very presence of saved form values for the same host may (at least in some browsers) ruin the record if it was edited and carelessly saved.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
index f2c70aa..a8117d7 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
@@ -134,15 +134,15 @@ YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.
134 var passwordElementConfiguration; 134 var passwordElementConfiguration;
135 135
136 if (scrambledStatus == 'SCRAMBLED') { 136 if (scrambledStatus == 'SCRAMBLED') {
137 varscrambledInputElement; 137 varscrambledInputElement;
138 138
139 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) { 139 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) {
140 scrambledInputElement = {tag:'input', type:'password', value:"this.value()"}; 140 scrambledInputElement = {tag:'input', type:'password', value:"this.value()", autocomplete:"off"};
141 } else { 141 } else {
142 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"}; 142 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()", autocomplete:"off"};
143 } 143 }
144 144
145 passwordElementConfiguration = 145 passwordElementConfiguration =
146 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[ 146 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[
147 {tag:'tbody', children:[ 147 {tag:'tbody', children:[
148 {tag:'tr', children:[ 148 {tag:'tr', children:[
@@ -156,13 +156,13 @@ YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.
156 ]} 156 ]}
157 ]} 157 ]}
158 ]}; 158 ]};
159 } else { 159 } else {
160 passwordElementConfiguration = 160 passwordElementConfiguration =
161 {tag:'div', children:[ 161 {tag:'div', children:[
162 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()"}, 162 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()", autocomplete:"off"},
163 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']} 163 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']}
164 ]}; 164 ]};
165 } 165 }
166 166
167 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true); 167 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true);
168 168
@@ -185,21 +185,21 @@ YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.
185 185
186 this.element().update(""); 186 this.element().update("");
187 switch(this.recordField().type()) { 187 switch(this.recordField().type()) {
188 case 'TXT': 188 case 'TXT':
189 case 'URL': 189 case 'URL':
190 case 'ADDR': 190 case 'ADDR':
191 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 191 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()", autocomplete:"off"}, true);
192 inputElement.dom.value = this.value(); 192 inputElement.dom.value = this.value();
193 break; 193 break;
194 case 'PWD': 194 case 'PWD':
195 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[ 195 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[
196 {tag:'tbody', children:[ 196 {tag:'tbody', children:[
197 {tag:'tr', children:[ 197 {tag:'tr', children:[
198 {tag:'td', valign:'top', children:[ 198 {tag:'td', valign:'top', children:[
199 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()"}, 199 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()", autocomplete:"off"},
200 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])} 200 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])}
201 ]}, 201 ]},
202 {tag:'td', valign:'top', children:[ 202 {tag:'td', valign:'top', children:[
203 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'} 203 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'}
204 ]} 204 ]}
205 ]} 205 ]}
@@ -212,13 +212,13 @@ YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.
212 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble'); 212 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble');
213 break; 213 break;
214 // case 'NOTE': 214 // case 'NOTE':
215 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true); 215 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true);
216 // break 216 // break
217 case 'DATE': 217 case 'DATE':
218 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 218 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()", autocomplete:"off"}, true);
219 inputElement.dom.value = this.value(); 219 inputElement.dom.value = this.value();
220 break; 220 break;
221 } 221 }
222 222
223 this.setInputElement(inputElement); 223 this.setInputElement(inputElement);
224 }, 224 },