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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 $('login-header-bar').disabled = value; | 131 $('login-header-bar').disabled = value; |
132 $('password-changed-cant-remember-link').classList[ | 132 $('password-changed-cant-remember-link').classList[ |
133 value ? 'add' : 'remove']('disabled'); | 133 value ? 'add' : 'remove']('disabled'); |
134 }, | 134 }, |
135 | 135 |
136 /** | 136 /** |
137 * Cancels password migration and drops the user back to the login screen. | 137 * Cancels password migration and drops the user back to the login screen. |
138 */ | 138 */ |
139 cancel: function() { | 139 cancel: function() { |
140 this.disabled = true; | 140 this.disabled = true; |
141 // Reset login action bar state. | |
142 $('login-header-bar').signinUIActive = false; | |
143 chrome.send('cancelPasswordChangedFlow'); | 141 chrome.send('cancelPasswordChangedFlow'); |
144 }, | 142 }, |
145 | 143 |
146 /** | 144 /** |
147 * Starts migration process using old password that user provided. | 145 * Starts migration process using old password that user provided. |
148 */ | 146 */ |
149 migrate: function() { | 147 migrate: function() { |
150 if (!$('old-password').value) { | 148 if (!$('old-password').value) { |
151 $('old-password').focus(); | 149 $('old-password').focus(); |
152 return; | 150 return; |
(...skipping 27 matching lines...) Expand all Loading... |
180 $('password-changed').disabled = false; | 178 $('password-changed').disabled = false; |
181 | 179 |
182 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); | 180 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); |
183 $('password-changed-ok-button').disabled = true; | 181 $('password-changed-ok-button').disabled = true; |
184 }; | 182 }; |
185 | 183 |
186 return { | 184 return { |
187 PasswordChangedScreen: PasswordChangedScreen | 185 PasswordChangedScreen: PasswordChangedScreen |
188 }; | 186 }; |
189 }); | 187 }); |
OLD | NEW |