| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 // Variable to track if a captcha challenge was issued. If this gets set to | 8 // Variable to track if a captcha challenge was issued. If this gets set to |
| 9 // true, it stays that way until we are told about successful login from | 9 // true, it stays that way until we are told about successful login from |
| 10 // the browser. This means subsequent errors (like invalid password) are | 10 // the browser. This means subsequent errors (like invalid password) are |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 var email = $('gaia-email'); | 571 var email = $('gaia-email'); |
| 572 var passwd = $('gaia-passwd'); | 572 var passwd = $('gaia-passwd'); |
| 573 if (f) { | 573 if (f) { |
| 574 if (args.user != undefined) { | 574 if (args.user != undefined) { |
| 575 if (email.value != args.user) | 575 if (email.value != args.user) |
| 576 passwd.value = ""; // Reset the password field | 576 passwd.value = ""; // Reset the password field |
| 577 email.value = args.user; | 577 email.value = args.user; |
| 578 } | 578 } |
| 579 | 579 |
| 580 if (!args.editable_user) { | 580 if (!args.editable_user) { |
| 581 email.style.display = 'none'; | 581 email.hidden = true; |
| 582 var span = document.getElementById('email-readonly'); | 582 var span = $('email-readonly'); |
| 583 span.appendChild(document.createTextNode(email.value)); | 583 span.textContent = email.value; |
| 584 span.style.display = 'inline'; | 584 span.hidden = false; |
| 585 $('create-account-div').hidden = true; | 585 $('create-account-div').hidden = true; |
| 586 } | 586 } |
| 587 | 587 |
| 588 f.accessCode.disabled = true; | 588 f.accessCode.disabled = true; |
| 589 } | 589 } |
| 590 | 590 |
| 591 if (1 == args.error) { | 591 if (1 == args.error) { |
| 592 var access_code = document.getElementById('access-code'); | 592 var access_code = document.getElementById('access-code'); |
| 593 if (access_code.value && access_code.value != "") { | 593 if (access_code.value && access_code.value != "") { |
| 594 $('errormsg-0-access-code').hidden = false; | 594 $('errormsg-0-access-code').hidden = false; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 | 724 |
| 725 SyncSetupOverlay.showSuccessAndSettingUp = function() { | 725 SyncSetupOverlay.showSuccessAndSettingUp = function() { |
| 726 SyncSetupOverlay.getInstance().showSuccessAndSettingUp_(); | 726 SyncSetupOverlay.getInstance().showSuccessAndSettingUp_(); |
| 727 }; | 727 }; |
| 728 | 728 |
| 729 // Export | 729 // Export |
| 730 return { | 730 return { |
| 731 SyncSetupOverlay: SyncSetupOverlay | 731 SyncSetupOverlay: SyncSetupOverlay |
| 732 }; | 732 }; |
| 733 }); | 733 }); |
| OLD | NEW |