OLD | NEW |
1 <html i18n-values="dir:textdirection;"> | 1 <html i18n-values="dir:textdirection;"> |
2 <head> | 2 <head> |
3 <style type="text/css"> | 3 <style type="text/css"> |
4 body,td,div,p,a,font,span {font-family: arial,sans-serif;} | 4 body,td,div,p,a,font,span {font-family: arial,sans-serif;} |
5 body { | 5 body { |
6 background-color:#ffffff; | 6 background-color:#ffffff; |
7 -webkit-user-select: none; | 7 -webkit-user-select: none; |
8 } | 8 } |
9 A:link {color:#0000cc; } | 9 A:link {color:#0000cc; } |
10 A:visited { color:#551a8b; } | 10 A:visited { color:#551a8b; } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 169 } |
170 | 170 |
171 function advanceThrobber() { | 171 function advanceThrobber() { |
172 var throbber = document.getElementById('throb'); | 172 var throbber = document.getElementById('throb'); |
173 throbber.style.backgroundPositionX = | 173 throbber.style.backgroundPositionX = |
174 ((parseInt(getComputedStyle(throbber).backgroundPositionX) - 16) % | 174 ((parseInt(getComputedStyle(throbber).backgroundPositionX) - 16) % |
175 576) + 'px'; | 175 576) + 'px'; |
176 } | 176 } |
177 | 177 |
178 function showGaiaLogin(args) { | 178 function showGaiaLogin(args) { |
179 var throbber = document.getElementById('throbber_container'); | 179 document.getElementById('throbber_container').style.display = "none"; |
180 throbber.style.display = "none"; | 180 document.getElementById('Email').disabled = false; |
| 181 document.getElementById('Passwd').disabled = false; |
| 182 |
181 var f = document.getElementById("gaia_loginform"); | 183 var f = document.getElementById("gaia_loginform"); |
182 if (f) { | 184 if (f) { |
183 f.Email.value = args.user; | 185 if (args.user != undefined) { |
| 186 if (f.Email.value != args.user) |
| 187 f.Passwd.value = ""; // Reset the password field |
| 188 f.Email.value = args.user; |
| 189 } |
| 190 |
184 if (!args.editable_user) { | 191 if (!args.editable_user) { |
185 f.Email.style.display = 'none'; | 192 f.Email.style.display = 'none'; |
186 var span = document.getElementById('email_readonly'); | 193 var span = document.getElementById('email_readonly'); |
187 span.appendChild(document.createTextNode(f.Email.value)); | 194 span.appendChild(document.createTextNode(f.Email.value)); |
188 span.style.display = 'inline'; | 195 span.style.display = 'inline'; |
189 setElementDisplay("createaccountdiv", "none"); | 196 setElementDisplay("createaccountdiv", "none"); |
190 } | 197 } |
191 | 198 |
192 f.AccessCode.disabled = true; | 199 f.AccessCode.disabled = true; |
193 } | 200 } |
| 201 |
194 if (1 == args.error) { | 202 if (1 == args.error) { |
195 var access_code = document.getElementById('AccessCode'); | 203 var access_code = document.getElementById('AccessCode'); |
196 if (access_code.value && access_code.value != "") { | 204 if (access_code.value && access_code.value != "") { |
197 setElementDisplay("errormsg_0_AccessCode", 'block'); | 205 setElementDisplay("errormsg_0_AccessCode", 'block'); |
198 showAccessCodeRequired(); | 206 showAccessCodeRequired(); |
199 } else { | 207 } else { |
200 setElementDisplay("errormsg_1_Password", 'table-row'); | 208 setElementDisplay("errormsg_1_Password", 'table-row'); |
201 } | 209 } |
202 setBlurbError(); | 210 setBlurbError(args.error_message); |
| 211 } else if (3 == args.error) { |
| 212 setElementDisplay("errormsg_0_Connection", 'table-row'); |
| 213 setBlurbError(args.error_message); |
| 214 } else if (4 == args.error) { |
| 215 showCaptcha(args); |
| 216 } else if (8 == args.error) { |
| 217 showAccessCodeRequired(); |
| 218 } else if (args.error_message) { |
| 219 setBlurbError(args.error_message); |
203 } | 220 } |
204 if (3 == args.error) { | 221 |
205 setElementDisplay("errormsg_0_Connection", 'table-row'); | |
206 setBlurbError(); | |
207 } | |
208 if (4 == args.error) { | |
209 showCaptcha(args); | |
210 } | |
211 if (8 == args.error) { | |
212 showAccessCodeRequired(); | |
213 } | |
214 document.getElementById("signIn").disabled = false; | 222 document.getElementById("signIn").disabled = false; |
215 document.getElementById("signIn").value = templateData['signin']; | 223 document.getElementById("signIn").value = templateData['signin']; |
216 gaia_setFocus(); | 224 gaia_setFocus(); |
217 } | 225 } |
218 | 226 |
219 function showCaptcha(args) { | 227 function showCaptcha(args) { |
220 g_is_captcha_challenge_active = true; | 228 g_is_captcha_challenge_active = true; |
221 | 229 |
222 // The captcha takes up lots of space, so make room. | 230 // The captcha takes up lots of space, so make room. |
223 setElementDisplay("top_blurb", "none"); | 231 setElementDisplay("top_blurb", "none"); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 "access_code" : f.AccessCode.value}); | 312 "access_code" : f.AccessCode.value}); |
305 document.getElementById("signIn").disabled = true; | 313 document.getElementById("signIn").disabled = true; |
306 chrome.send("SubmitAuth", [result]); | 314 chrome.send("SubmitAuth", [result]); |
307 } | 315 } |
308 | 316 |
309 function setElementDisplay(id, display) { | 317 function setElementDisplay(id, display) { |
310 var d = document.getElementById(id); | 318 var d = document.getElementById(id); |
311 if (d) | 319 if (d) |
312 d.style.display = display; | 320 d.style.display = display; |
313 } | 321 } |
314 | 322 |
315 function hideBlurb() { | 323 function hideBlurb() { |
316 setElementDisplay('top_blurb', 'none'); | 324 setElementDisplay('top_blurb', 'none'); |
317 } | 325 } |
318 | 326 |
319 function setBlurbError() { | 327 function setBlurbError(error_message) { |
320 if (g_is_captcha_challenge_active) | 328 if (g_is_captcha_challenge_active) |
321 return; // No blurb in captcha challenge mode. | 329 return; // No blurb in captcha challenge mode. |
| 330 if (error_message) { |
| 331 document.getElementById('error_signing_in').style.display = 'none'; |
| 332 document.getElementById('error_custom').style.display = 'inline'; |
| 333 document.getElementById('error_custom').textContent = error_message; |
| 334 } else { |
| 335 document.getElementById('error_signing_in').style.display = 'inline'; |
| 336 document.getElementById('error_custom').style.display = 'none'; |
| 337 } |
322 document.getElementById("top_blurb_error").style.visibility = "visible"; | 338 document.getElementById("top_blurb_error").style.visibility = "visible"; |
323 document.getElementById('Email').disabled = false; | 339 document.getElementById('Email').disabled = false; |
324 document.getElementById('Passwd').disabled = false; | 340 document.getElementById('Passwd').disabled = false; |
325 } | 341 } |
326 | 342 |
327 function resetErrorVisibility() { | 343 function resetErrorVisibility() { |
328 setElementDisplay("errormsg_0_Email", 'none'); | 344 setElementDisplay("errormsg_0_Email", 'none'); |
329 setElementDisplay("errormsg_0_Password", 'none'); | 345 setElementDisplay("errormsg_0_Password", 'none'); |
330 setElementDisplay("errormsg_1_Password", 'none'); | 346 setElementDisplay("errormsg_1_Password", 'none'); |
331 setElementDisplay("errormsg_0_Connection", 'none'); | 347 setElementDisplay("errormsg_0_Connection", 'none'); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 .gaia.le.button { font-family: Arial, Helvetica, sans-serif; } | 381 .gaia.le.button { font-family: Arial, Helvetica, sans-serif; } |
366 .gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller
; } | 382 .gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller
; } |
367 .gaia.captchahtml.desc { font-family: arial, sans-serif; font-size: smaller;
} | 383 .gaia.captchahtml.desc { font-family: arial, sans-serif; font-size: smaller;
} |
368 .gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size: smaller; | 384 .gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size: smaller; |
369 font-style: italic; } | 385 font-style: italic; } |
370 </style> | 386 </style> |
371 <div id="top_blurb"> | 387 <div id="top_blurb"> |
372 <span i18n-content="introduction"></span> | 388 <span i18n-content="introduction"></span> |
373 </div> | 389 </div> |
374 <div id="top_blurb_error" style="visibility:hidden"> | 390 <div id="top_blurb_error" style="visibility:hidden"> |
375 <span i18n-content="errorsigningin"></span> | 391 <span id="error_signing_in" i18n-content="errorsigningin"></span> |
| 392 <span id="error_custom" style="display:none;"></span> |
376 </div> | 393 </div> |
377 <form id="gaia_loginform" onsubmit="sendCredentialsAndClose(); return false;"> | 394 <form id="gaia_loginform" onsubmit="sendCredentialsAndClose(); return false;"> |
378 <div id="gaia_loginbox"> | 395 <div id="gaia_loginbox"> |
379 <table id="content_table" class="form-noindent" cellspacing="0" cellpadding="5" | 396 <table id="content_table" class="form-noindent" cellspacing="0" cellpadding="5" |
380 width="75%" border="0" align="center"> | 397 width="75%" border="0" align="center"> |
381 <tr> | 398 <tr> |
382 <td valign="top" style="text-align:center" nowrap="nowrap" | 399 <td valign="top" style="text-align:center" nowrap="nowrap" |
383 bgcolor="#e8eefa"> | 400 bgcolor="#e8eefa"> |
384 <div> | 401 <div> |
385 <table id="gaia_table" align="center" border="0" cellpadding="1" | 402 <table id="gaia_table" align="center" border="0" cellpadding="1" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 </form> | 591 </form> |
575 </td> | 592 </td> |
576 </tr> | 593 </tr> |
577 <tr> | 594 <tr> |
578 <td class="cancelspacenocaptcha" id="cancelspacer" colspan="2"> | 595 <td class="cancelspacenocaptcha" id="cancelspacer" colspan="2"> |
579 </td> | 596 </td> |
580 </tr> | 597 </tr> |
581 </table> | 598 </table> |
582 </body> | 599 </body> |
583 </html> | 600 </html> |
OLD | NEW |