Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js | 52 |
1 files changed, 15 insertions, 37 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js index 389d876..a10ba4f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginForm.js | |||
@@ -60,34 +60,19 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Com | |||
60 | {tag:'div', cls:'header'}, | 60 | {tag:'div', cls:'header'}, |
61 | {tag:'div', cls:'body', id:this.getId('body'), children:[ | 61 | {tag:'div', cls:'body', id:this.getId('body'), children:[ |
62 | {tag:'div', id:this.getId('loginForm'), children:[ | 62 | {tag:'div', id:this.getId('loginForm'), children:[ |
63 | {tag:'div', children:[ | 63 | {tag:'div', children:[ |
64 | {tag:'h4', html:'Login'}, | 64 | {tag:'h4', html:'Login'}, |
65 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ | 65 | // {tag:'form', cls:'loginForm', autocomplete:this.autocomplete(), children:[ |
66 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ | 66 | {tag:'form', id:this.getId('form'), cls:'loginForm', children:[ |
67 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, | 67 | {tag:'label', html:'username', 'for':this.getId('usernameField')}, |
68 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'/*, value:'joe'*/}, | 68 | {tag:'input', id:this.getId('usernameField'), type:'text', cls:'username'}, |
69 | {tag:'ul', id:this.getId('passwordOptions'), children:[ | 69 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, |
70 | {tag:'li', id:this.getId('passphraseOption'), children:[ | 70 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'}, |
71 | {tag:'label', html:'passphrase / OTP', 'for':this.getId('passphraseField')}, | ||
72 | {tag:'input', id:this.getId('passphraseField'), type:'password', cls:'password'/*, value:'clipperz'*/} | ||
73 | ]} //, | ||
74 | /* | ||
75 | {tag:'li', id:this.getId('otpOption'), children:[ | ||
76 | {tag:'label', html:'one-time password', 'for':this.getId('otpField_1')}, | ||
77 | {tag:'input', id:this.getId('otpField_1'), type:'text', cls:'otp', value:'abcd-efgh'}, | ||
78 | {tag:'input', id:this.getId('otpField_2'), type:'text', cls:'otp', value:'abcd-efgh'}, | ||
79 | {tag:'input', id:this.getId('otpField_3'), type:'text', cls:'otp', value:'abcd-efgh'}, | ||
80 | {tag:'input', id:this.getId('otpField_4'), type:'text', cls:'otp', value:'abcd-efgh'} | ||
81 | ]} | ||
82 | */ | ||
83 | ]}, | ||
84 | // {tag:'input', id:this.getId('otpCheckbox'), type:'checkbox', cls:'checkbox'}, | ||
85 | // {tag:'label', html:'use a one-time passphrase', 'for':this.getId('otpCheckbox'), cls:'checkbox'}, | ||
86 | 71 | ||
87 | {tag:'div', cls:'translations', children:[ | 72 | {tag:'div', cls:'translations', children:[ |
88 | {tag:'h4', html:'choose your language'}, | 73 | {tag:'h4', html:'choose your language'}, |
89 | {tag:'ul', children:[ | 74 | {tag:'ul', children:[ |
90 | {tag:'li', cls:'selected', html:'english'}, | 75 | {tag:'li', cls:'selected', html:'english'}, |
91 | {tag:'li', html:'italiano'}, | 76 | {tag:'li', html:'italiano'}, |
92 | {tag:'li', html:'dutch'}, | 77 | {tag:'li', html:'dutch'}, |
93 | {tag:'li', html:'french'}, | 78 | {tag:'li', html:'french'}, |
@@ -156,39 +141,32 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginForm, Clipperz.PM.UI.Com | |||
156 | 'showOTPFields': function() { | 141 | 'showOTPFields': function() { |
157 | this.hideElement('passphraseOption'); | 142 | this.hideElement('passphraseOption'); |
158 | this.showElement('otpOption'); | 143 | this.showElement('otpOption'); |
159 | }, | 144 | }, |
160 | */ | 145 | */ |
161 | //------------------------------------------------------------------------- | 146 | //------------------------------------------------------------------------- |
162 | 147 | ||
163 | 'loginEventHandler': function(anEvent) { | 148 | 'loginEventHandler': function(anEvent) { |
164 | varusername; | 149 | // varusername; |
165 | var passphrase; | 150 | // var passphrase; |
166 | // var shouldUseOTP; | ||
167 | // var otp; | ||
168 | var signalArguments; | 151 | var signalArguments; |
169 | 152 | ||
170 | anEvent.preventDefault(); | 153 | anEvent.preventDefault(); |
171 | 154 | ||
172 | username = this.getElement('usernameField').value; | 155 | // username = this.getElement('usernameField').value; |
173 | passphrase = this.getElement('passphraseField').value; | 156 | // passphrase = this.getElement('passphraseField').value; |
174 | // otp =this.getElement('otpField_1').value + | 157 | |
175 | // this.getElement('otpField_2').value + | 158 | // signalArguments = {username:username}; |
176 | // this.getElement('otpField_3').value + | 159 | // signalArguments.passphrase = passphrase; |
177 | // this.getElement('otpField_4').value; | 160 | |
178 | // shouldUseOTP = this.getElement('otpCheckbox').checked; | 161 | signalArguments = { |
179 | 162 | 'username': this.getElement('usernameField').value, | |
180 | signalArguments = {username:username}; | 163 | 'passphrase':this.getElement('passphraseField').value |
181 | 164 | }; | |
182 | // if (shouldUseOTP) { | ||
183 | // signalArguments.otp = otp; | ||
184 | // } else { | ||
185 | signalArguments.passphrase = passphrase; | ||
186 | // } | ||
187 | 165 | ||
188 | MochiKit.Signal.signal(this, 'doLogin', signalArguments); | 166 | MochiKit.Signal.signal(this, 'doLogin', signalArguments); |
189 | }, | 167 | }, |
190 | 168 | ||
191 | //------------------------------------------------------------------------- | 169 | //------------------------------------------------------------------------- |
192 | 170 | ||
193 | 'submitButtonElement': function() { | 171 | 'submitButtonElement': function() { |
194 | return this.getElement('submitButton'); | 172 | return this.getElement('submitButton'); |