| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
| 6 * @fileoverview Password changed screen implementation. | 6 * @fileoverview Password changed screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 /** | 10 /** |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 /** | 165 /** |
| 166 * Show password changed screen. | 166 * Show password changed screen. |
| 167 * @param {boolean} showError Whether to show the incorrect password error. | 167 * @param {boolean} showError Whether to show the incorrect password error. |
| 168 */ | 168 */ |
| 169 PasswordChangedScreen.show = function(showError) { | 169 PasswordChangedScreen.show = function(showError) { |
| 170 // We'll get here after the successful online authentication. | 170 // We'll get here after the successful online authentication. |
| 171 // It assumes session is about to start so hides login screen controls. | 171 // It assumes session is about to start so hides login screen controls. |
| 172 Oobe.getInstance().headerHidden = false; | 172 Oobe.getInstance().headerHidden = false; |
| 173 var screen = $('password-changed'); | 173 var screen = $('password-changed'); |
| 174 screen.classList[showError ? 'add' : 'remove']('password-error'); | 174 screen.classList.toggle('password-error', showError); |
| 175 screen.classList.add('migrate'); | 175 screen.classList.add('migrate'); |
| 176 screen.classList.remove('resync'); | 176 screen.classList.remove('resync'); |
| 177 $('old-password').value = ''; | 177 $('old-password').value = ''; |
| 178 $('password-changed').disabled = false; | 178 $('password-changed').disabled = false; |
| 179 | 179 |
| 180 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); | 180 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); |
| 181 $('password-changed-ok-button').disabled = true; | 181 $('password-changed-ok-button').disabled = true; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 return { | 184 return { |
| 185 PasswordChangedScreen: PasswordChangedScreen | 185 PasswordChangedScreen: PasswordChangedScreen |
| 186 }; | 186 }; |
| 187 }); | 187 }); |
| OLD | NEW |