author | Michael Krelin <hacker@klever.net> | 2013-11-29 21:02:52 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2013-11-29 21:02:52 (UTC) |
commit | 603bcf8293434f4bb8c7435fa02a7fb435632d81 (patch) (unidiff) | |
tree | 669995150fa35aff97d9953a55f28da20c9373b2 /frontend | |
parent | 11a51653179a40dff1ecf13b9b4eb5e073920c04 (diff) | |
download | clipperz-603bcf8293434f4bb8c7435fa02a7fb435632d81.zip clipperz-603bcf8293434f4bb8c7435fa02a7fb435632d81.tar.gz clipperz-603bcf8293434f4bb8c7435fa02a7fb435632d81.tar.bz2 |
turn off autocompletion for change passphrase form
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js index defce91..a627adc 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | |||
@@ -1,375 +1,375 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2013 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz, the online password manager. | 5 | This file is part of Clipperz, the online password manager. |
6 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
7 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
8 | 8 | ||
9 | * Clipperz is free software: you can redistribute it and/or modify it | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
10 | under the terms of the GNU Affero General Public License as published | 10 | under the terms of the GNU Affero General Public License as published |
11 | by the Free Software Foundation, either version 3 of the License, or | 11 | by the Free Software Foundation, either version 3 of the License, or |
12 | (at your option) any later version. | 12 | (at your option) any later version. |
13 | 13 | ||
14 | * Clipperz is distributed in the hope that it will be useful, but | 14 | * Clipperz is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
18 | 18 | ||
19 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 27 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
28 | 28 | ||
29 | //############################################################################# | 29 | //############################################################################# |
30 | 30 | ||
31 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { | 31 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { |
32 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); | 32 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); |
33 | args = args || {}; | 33 | args = args || {}; |
34 | 34 | ||
35 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); | 35 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); |
36 | 36 | ||
37 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 37 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
38 | 38 | ||
39 | this._shouldLoadLoginHistory = true; | 39 | this._shouldLoadLoginHistory = true; |
40 | 40 | ||
41 | //this.render(); | 41 | //this.render(); |
42 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); | 42 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); |
43 | 43 | ||
44 | return this; | 44 | return this; |
45 | } | 45 | } |
46 | 46 | ||
47 | //============================================================================= | 47 | //============================================================================= |
48 | 48 | ||
49 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { | 49 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { |
50 | 50 | ||
51 | 'toString': function() { | 51 | 'toString': function() { |
52 | return "Clipperz.PM.Components.AccountPanel component"; | 52 | return "Clipperz.PM.Components.AccountPanel component"; |
53 | }, | 53 | }, |
54 | 54 | ||
55 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
56 | 56 | ||
57 | 'render': function() { | 57 | 'render': function() { |
58 | var errorMessageActor; | 58 | var errorMessageActor; |
59 | varchangePasswordButton; | 59 | varchangePasswordButton; |
60 | var deleteAccountButton; | 60 | var deleteAccountButton; |
61 | 61 | ||
62 | try { | 62 | try { |
63 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); | 63 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); |
64 | Clipperz.NotificationCenter.unregister(this); | 64 | Clipperz.NotificationCenter.unregister(this); |
65 | MochiKit.Signal.disconnectAllTo(this); | 65 | MochiKit.Signal.disconnectAllTo(this); |
66 | 66 | ||
67 | this.element().update(""); | 67 | this.element().update(""); |
68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 68 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
69 | {tag:'tbody', children:[ | 69 | {tag:'tbody', children:[ |
70 | {tag:'tr', children:[ | 70 | {tag:'tr', children:[ |
71 | {tag:'td', valign:'top', width:'200', children:[ | 71 | {tag:'td', valign:'top', width:'200', children:[ |
72 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ | 72 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ |
73 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, | 73 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, |
74 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, | 74 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, |
75 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, | 75 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, |
76 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, | 76 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, |
77 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} | 77 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} |
78 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} | 78 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} |
79 | ]} | 79 | ]} |
80 | ]}, | 80 | ]}, |
81 | {tag:'td', valign:'top', children:[ | 81 | {tag:'td', valign:'top', children:[ |
82 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 82 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
83 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ | 83 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ |
84 | {tag:'div', cls:'clipperzSubPanel', children:[ | 84 | {tag:'div', cls:'clipperzSubPanel', children:[ |
85 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, | 85 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, |
86 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ | 86 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ |
87 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ | 87 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ |
88 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, | 88 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, |
89 | {tag:'table', cls:'panelBody', children:[ | 89 | {tag:'table', cls:'panelBody', children:[ |
90 | {tag:'tr', children:[ | 90 | {tag:'tr', children:[ |
91 | {tag:'td', children:[ | 91 | {tag:'td', children:[ |
92 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} | 92 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} |
93 | ]}, | 93 | ]}, |
94 | {tag:'td', children:[ | 94 | {tag:'td', children:[ |
95 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} | 95 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username'), autocomplete:'off'} |
96 | ]} | 96 | ]} |
97 | ]}, | 97 | ]}, |
98 | {tag:'tr', children:[ | 98 | {tag:'tr', children:[ |
99 | {tag:'td', children:[ | 99 | {tag:'td', children:[ |
100 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} | 100 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} |
101 | ]}, | 101 | ]}, |
102 | {tag:'td', children:[ | 102 | {tag:'td', children:[ |
103 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} | 103 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase'), autocomplete:'off'} |
104 | ]} | 104 | ]} |
105 | ]}, | 105 | ]}, |
106 | {tag:'tr', children:[ | 106 | {tag:'tr', children:[ |
107 | {tag:'td', children:[ | 107 | {tag:'td', children:[ |
108 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} | 108 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} |
109 | ]}, | 109 | ]}, |
110 | {tag:'td', children:[ | 110 | {tag:'td', children:[ |
111 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} | 111 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase'), autocomplete:'off'} |
112 | ]} | 112 | ]} |
113 | ]}, | 113 | ]}, |
114 | {tag:'tr', children:[ | 114 | {tag:'tr', children:[ |
115 | {tag:'td', children:[ | 115 | {tag:'td', children:[ |
116 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} | 116 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} |
117 | ]}, | 117 | ]}, |
118 | {tag:'td', children:[ | 118 | {tag:'td', children:[ |
119 | {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')} | 119 | {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase'), autocomplete:'off'} |
120 | ]} | 120 | ]} |
121 | ]}, | 121 | ]}, |
122 | {tag:'tr', children:[ | 122 | {tag:'tr', children:[ |
123 | {tag:'td', align:'right', children:[ | 123 | {tag:'td', align:'right', children:[ |
124 | {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} | 124 | {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} |
125 | ]}, | 125 | ]}, |
126 | {tag:'td', children:[ | 126 | {tag:'td', children:[ |
127 | {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} | 127 | {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} |
128 | ]} | 128 | ]} |
129 | ]} | 129 | ]} |
130 | ]}, | 130 | ]}, |
131 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ | 131 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ |
132 | {tag:'div', id:this.getId('changePassphraseButton')} | 132 | {tag:'div', id:this.getId('changePassphraseButton')} |
133 | ]} | 133 | ]} |
134 | ]} | 134 | ]} |
135 | ]} | 135 | ]} |
136 | ]} | 136 | ]} |
137 | ]}, | 137 | ]}, |
138 | {tag:'li', id:this.getId('manageOTPPanel'), children:[ | 138 | {tag:'li', id:this.getId('manageOTPPanel'), children:[ |
139 | {tag:'div', cls:'clipperzSubPanel', children:[ | 139 | {tag:'div', cls:'clipperzSubPanel', children:[ |
140 | {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, | 140 | {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, |
141 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, | 141 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, |
142 | {tag:'div', id:'OTPComponent'} | 142 | {tag:'div', id:'OTPComponent'} |
143 | ]} | 143 | ]} |
144 | ]}, | 144 | ]}, |
145 | {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ | 145 | {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ |
146 | {tag:'div', cls:'clipperzSubPanel', children:[ | 146 | {tag:'div', cls:'clipperzSubPanel', children:[ |
147 | {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, | 147 | {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, |
148 | {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} | 148 | {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} |
149 | ]} | 149 | ]} |
150 | ]}, | 150 | ]}, |
151 | {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ | 151 | {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ |
152 | {tag:'div', cls:'clipperzSubPanel', children:[ | 152 | {tag:'div', cls:'clipperzSubPanel', children:[ |
153 | {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, | 153 | {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, |
154 | {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} | 154 | {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} |
155 | ]} | 155 | ]} |
156 | ]}, | 156 | ]}, |
157 | {tag:'li', id:this.getId('deleteAccountPanel'), children:[ | 157 | {tag:'li', id:this.getId('deleteAccountPanel'), children:[ |
158 | {tag:'div', cls:'clipperzSubPanel', children:[ | 158 | {tag:'div', cls:'clipperzSubPanel', children:[ |
159 | {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, | 159 | {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, |
160 | 160 | ||
161 | {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ | 161 | {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ |
162 | {tag:'form', id:this.getId('deleteAccountForm'), children:[ | 162 | {tag:'form', id:this.getId('deleteAccountForm'), children:[ |
163 | {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, | 163 | {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, |
164 | {tag:'table', cls:'panelBody', children:[ | 164 | {tag:'table', cls:'panelBody', children:[ |
165 | {tag:'tr', children:[ | 165 | {tag:'tr', children:[ |
166 | {tag:'td', children:[ | 166 | {tag:'td', children:[ |
167 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} | 167 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} |
168 | ]}, | 168 | ]}, |
169 | {tag:'td', children:[ | 169 | {tag:'td', children:[ |
170 | {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} | 170 | {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} |
171 | ]} | 171 | ]} |
172 | ]}, | 172 | ]}, |
173 | {tag:'tr', children:[ | 173 | {tag:'tr', children:[ |
174 | {tag:'td', children:[ | 174 | {tag:'td', children:[ |
175 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} | 175 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} |
176 | ]}, | 176 | ]}, |
177 | {tag:'td', children:[ | 177 | {tag:'td', children:[ |
178 | {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} | 178 | {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} |
179 | ]} | 179 | ]} |
180 | ]}, | 180 | ]}, |
181 | {tag:'tr', children:[ | 181 | {tag:'tr', children:[ |
182 | {tag:'td', align:'right', children:[ | 182 | {tag:'td', align:'right', children:[ |
183 | {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} | 183 | {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} |
184 | ]}, | 184 | ]}, |
185 | {tag:'td', children:[ | 185 | {tag:'td', children:[ |
186 | {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} | 186 | {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} |
187 | ]} | 187 | ]} |
188 | ]} | 188 | ]} |
189 | ]}, | 189 | ]}, |
190 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ | 190 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ |
191 | {tag:'div', id:this.getId('deleteAccountButton')} | 191 | {tag:'div', id:this.getId('deleteAccountButton')} |
192 | ]} | 192 | ]} |
193 | ]} | 193 | ]} |
194 | ]} | 194 | ]} |
195 | ]} | 195 | ]} |
196 | ]} | 196 | ]} |
197 | /* | 197 | /* |
198 | {tag:'li', id:this.getId('paidAccountPanel'), children:[ | 198 | {tag:'li', id:this.getId('paidAccountPanel'), children:[ |
199 | {tag:'div', cls:'clipperzSubPanel', children:[ | 199 | {tag:'div', cls:'clipperzSubPanel', children:[ |
200 | {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, | 200 | {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, |
201 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} | 201 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} |
202 | ]} | 202 | ]} |
203 | ]} | 203 | ]} |
204 | */ | 204 | */ |
205 | ]} | 205 | ]} |
206 | ]} | 206 | ]} |
207 | ]} | 207 | ]} |
208 | ]} | 208 | ]} |
209 | ]}); | 209 | ]}); |
210 | 210 | ||
211 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); | 211 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); |
212 | MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown'); | 212 | MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown'); |
213 | errorMessageActor = this.getActor('changePassphrase_errorMessage'); | 213 | errorMessageActor = this.getActor('changePassphrase_errorMessage'); |
214 | errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 214 | errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
215 | errorMessageActor.update("---"); | 215 | errorMessageActor.update("---"); |
216 | errorMessageActor.hide(); | 216 | errorMessageActor.hide(); |
217 | changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this}); | 217 | changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this}); |
218 | 218 | ||
219 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 2"); | 219 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 2"); |
220 | 220 | ||
221 | MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown'); | 221 | MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown'); |
222 | errorMessageActor = this.getActor('deleteAccount_errorMessage'); | 222 | errorMessageActor = this.getActor('deleteAccount_errorMessage'); |
223 | errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 223 | errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
224 | errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']); | 224 | errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']); |
225 | errorMessageActor.hide(); | 225 | errorMessageActor.hide(); |
226 | deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this}); | 226 | deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this}); |
227 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 5"); | 227 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 5"); |
228 | 228 | ||
229 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 229 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
230 | this.getElement('changePassphraseForm').addClass('read-only'); | 230 | this.getElement('changePassphraseForm').addClass('read-only'); |
231 | // this.getElement('accountPreferencesForm').addClass('read-only'); | 231 | // this.getElement('accountPreferencesForm').addClass('read-only'); |
232 | this.getElement('deleteAccountForm').addClass('read-only'); | 232 | this.getElement('deleteAccountForm').addClass('read-only'); |
233 | changePasswordButton.disable(); | 233 | changePasswordButton.disable(); |
234 | deleteAccountButton.disable(); | 234 | deleteAccountButton.disable(); |
235 | } | 235 | } |
236 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 6"); | 236 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 6"); |
237 | 237 | ||
238 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase')); | 238 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase')); |
239 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase')); | 239 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase')); |
240 | 240 | ||
241 | new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()}); | 241 | new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()}); |
242 | 242 | ||
243 | this.tabPanelController().setUp(); | 243 | this.tabPanelController().setUp(); |
244 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); | 244 | Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); |
245 | Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences'); | 245 | Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences'); |
246 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 246 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
247 | //MochiKit.Logging.logDebug("<<< AccountPanel.render"); | 247 | //MochiKit.Logging.logDebug("<<< AccountPanel.render"); |
248 | 248 | ||
249 | } catch(exception) { | 249 | } catch(exception) { |
250 | MochiKit.Logging.logError("### " + exception); | 250 | MochiKit.Logging.logError("### " + exception); |
251 | throw exception; | 251 | throw exception; |
252 | } | 252 | } |
253 | }, | 253 | }, |
254 | 254 | ||
255 | //------------------------------------------------------------------------- | 255 | //------------------------------------------------------------------------- |
256 | 256 | ||
257 | 'tabPanelController': function() { | 257 | 'tabPanelController': function() { |
258 | if (this._tabPanelController == null) { | 258 | if (this._tabPanelController == null) { |
259 | var tabPanelControllerConfig; | 259 | var tabPanelControllerConfig; |
260 | 260 | ||
261 | tabPanelControllerConfig = {} | 261 | tabPanelControllerConfig = {} |
262 | tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel'); | 262 | tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel'); |
263 | tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel'); | 263 | tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel'); |
264 | tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel'); | 264 | tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel'); |
265 | tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel'); | 265 | tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel'); |
266 | tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel'); | 266 | tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel'); |
267 | // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel'); | 267 | // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel'); |
268 | 268 | ||
269 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ | 269 | this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ |
270 | name:'accountTabPanel', | 270 | name:'accountTabPanel', |
271 | config:tabPanelControllerConfig, | 271 | config:tabPanelControllerConfig, |
272 | selectedTab:'changePassphraseTab' | 272 | selectedTab:'changePassphraseTab' |
273 | }); | 273 | }); |
274 | } | 274 | } |
275 | 275 | ||
276 | return this._tabPanelController; | 276 | return this._tabPanelController; |
277 | }, | 277 | }, |
278 | 278 | ||
279 | //------------------------------------------------------------------------- | 279 | //------------------------------------------------------------------------- |
280 | 280 | ||
281 | 'doChangePassphrase': function() { | 281 | 'doChangePassphrase': function() { |
282 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { | 282 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { |
283 | varusername; | 283 | varusername; |
284 | varoldPassphrase; | 284 | varoldPassphrase; |
285 | var newPassphrase; | 285 | var newPassphrase; |
286 | var renewPassphrase; | 286 | var renewPassphrase; |
287 | var safetyCheck; | 287 | var safetyCheck; |
288 | varareThereAnyErrors; | 288 | varareThereAnyErrors; |
289 | var errorMessageActor; | 289 | var errorMessageActor; |
290 | 290 | ||
291 | errorMessageActor = this.getActor('changePassphrase_errorMessage'); | 291 | errorMessageActor = this.getActor('changePassphrase_errorMessage'); |
292 | 292 | ||
293 | areThereAnyErrors = false; | 293 | areThereAnyErrors = false; |
294 | username = this.getDom('changePassphrase_username').value; | 294 | username = this.getDom('changePassphrase_username').value; |
295 | oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value; | 295 | oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value; |
296 | newPassphrase= this.getDom('changePassphrase_newPassphrase').value; | 296 | newPassphrase= this.getDom('changePassphrase_newPassphrase').value; |
297 | renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value; | 297 | renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value; |
298 | safetyCheck = this.getDom('changePassphrase_safetyCheck').checked; | 298 | safetyCheck = this.getDom('changePassphrase_safetyCheck').checked; |
299 | 299 | ||
300 | if (this.user().username() != username) { | 300 | if (this.user().username() != username) { |
301 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']); | 301 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']); |
302 | this.getElement('changePassphrase_username').focus().dom.select(); | 302 | this.getElement('changePassphrase_username').focus().dom.select(); |
303 | areThereAnyErrors = true; | 303 | areThereAnyErrors = true; |
304 | } else if (this.user().passphrase() != oldPassphrase) { | 304 | } else if (this.user().passphrase() != oldPassphrase) { |
305 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']); | 305 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']); |
306 | this.getElement('changePassphrase_oldPassphrase').focus().dom.select(); | 306 | this.getElement('changePassphrase_oldPassphrase').focus().dom.select(); |
307 | areThereAnyErrors = true; | 307 | areThereAnyErrors = true; |
308 | } else if (newPassphrase != renewPassphrase) { | 308 | } else if (newPassphrase != renewPassphrase) { |
309 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']); | 309 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']); |
310 | this.getElement('changePassphrase_renewPassphrase').focus().dom.select(); | 310 | this.getElement('changePassphrase_renewPassphrase').focus().dom.select(); |
311 | areThereAnyErrors = true; | 311 | areThereAnyErrors = true; |
312 | } else if (safetyCheck != true) { | 312 | } else if (safetyCheck != true) { |
313 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']); | 313 | this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']); |
314 | this.getElement('changePassphrase_safetyCheck').focus(); | 314 | this.getElement('changePassphrase_safetyCheck').focus(); |
315 | areThereAnyErrors = true; | 315 | areThereAnyErrors = true; |
316 | } | 316 | } |
317 | 317 | ||
318 | if (areThereAnyErrors == false) { | 318 | if (areThereAnyErrors == false) { |
319 | errorMessageActor.hide(); | 319 | errorMessageActor.hide(); |
320 | this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase); | 320 | this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase); |
321 | } | 321 | } |
322 | } | 322 | } |
323 | }, | 323 | }, |
324 | 324 | ||
325 | //------------------------------------------------------------------------- | 325 | //------------------------------------------------------------------------- |
326 | 326 | ||
327 | 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) { | 327 | 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) { |
328 | var deferredResult; | 328 | var deferredResult; |
329 | 329 | ||
330 | //MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user()); | 330 | //MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user()); |
331 | deferredResult = new MochiKit.Async.Deferred(); | 331 | deferredResult = new MochiKit.Async.Deferred(); |
332 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;}); | 332 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;}); |
333 | deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), | 333 | deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), |
334 | { | 334 | { |
335 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'], | 335 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'], |
336 | text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'], | 336 | text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'], |
337 | width:240, | 337 | width:240, |
338 | showProgressBar:true, | 338 | showProgressBar:true, |
339 | showCloseButton:false, | 339 | showCloseButton:false, |
340 | steps:4 | 340 | steps:4 |
341 | }, | 341 | }, |
342 | this.getDom('changePassphraseButton') | 342 | this.getDom('changePassphraseButton') |
343 | ); | 343 | ); |
344 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;}); | 344 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;}); |
345 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase); | 345 | deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase); |
346 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;}); | 346 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;}); |
347 | deferredResult.addCallback(function() { | 347 | deferredResult.addCallback(function() { |
348 | Clipperz.PM.Components.MessageBox().update({ | 348 | Clipperz.PM.Components.MessageBox().update({ |
349 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'], | 349 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'], |
350 | text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'], | 350 | text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'], |
351 | /*showProgressBar:false,*/ | 351 | /*showProgressBar:false,*/ |
352 | step:'next' | 352 | step:'next' |
353 | }); | 353 | }); |
354 | }); | 354 | }); |
355 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;}); | 355 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;}); |
356 | deferredResult.addCallback(MochiKit.Async.wait, 1); | 356 | deferredResult.addCallback(MochiKit.Async.wait, 1); |
357 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;}); | 357 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;}); |
358 | deferredResult.addCallback(function(anAccountPanel, res) { | 358 | deferredResult.addCallback(function(anAccountPanel, res) { |
359 | Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); | 359 | Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); |
360 | 360 | ||
361 | anAccountPanel.getDom('changePassphrase_username').value = ""; | 361 | anAccountPanel.getDom('changePassphrase_username').value = ""; |
362 | anAccountPanel.getDom('changePassphrase_oldPassphrase').value = ""; | 362 | anAccountPanel.getDom('changePassphrase_oldPassphrase').value = ""; |
363 | anAccountPanel.getElement('changePassphrase_oldPassphrase').focus(); | 363 | anAccountPanel.getElement('changePassphrase_oldPassphrase').focus(); |
364 | anAccountPanel.getDom('changePassphrase_newPassphrase').value = ""; | 364 | anAccountPanel.getDom('changePassphrase_newPassphrase').value = ""; |
365 | anAccountPanel.getElement('changePassphrase_newPassphrase').focus(); | 365 | anAccountPanel.getElement('changePassphrase_newPassphrase').focus(); |
366 | anAccountPanel.getDom('changePassphrase_renewPassphrase').value = ""; | 366 | anAccountPanel.getDom('changePassphrase_renewPassphrase').value = ""; |
367 | anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false; | 367 | anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false; |
368 | 368 | ||
369 | anAccountPanel.getElement('changePassphrase_username').focus(); | 369 | anAccountPanel.getElement('changePassphrase_username').focus(); |
370 | return res; | 370 | return res; |
371 | }, this); | 371 | }, this); |
372 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;}); | 372 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;}); |
373 | deferredResult.addErrback(function() { | 373 | deferredResult.addErrback(function() { |
374 | Clipperz.PM.Components.MessageBox().update({ | 374 | Clipperz.PM.Components.MessageBox().update({ |
375 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'], | 375 | title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'], |