| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 wrong HWID screen implementation. | 6 * @fileoverview wrong HWID screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 login.createScreen('WrongHWIDScreen', 'wrong-hwid', function() { | 9 login.createScreen('WrongHWIDScreen', 'wrong-hwid', function() { |
| 10 return { | 10 return { |
| 11 /** @override */ | 11 /** @override */ |
| 12 decorate: function() { | 12 decorate: function() { |
| 13 $('skip-hwid-warning-link').addEventListener('click', function(event) { | 13 $('skip-hwid-warning-link').addEventListener('click', function(event) { |
| 14 chrome.send('wrongHWIDOnSkip'); | 14 chrome.send('wrongHWIDOnSkip'); |
| 15 }); | 15 }); |
| 16 this.updateLocalizedContent(); | 16 this.updateLocalizedContent(); |
| 17 }, | 17 }, |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Updates state of login header so that necessary buttons are displayed. | 20 * Updates state of login header so that necessary buttons are displayed. |
| 21 **/ | 21 */ |
| 22 onBeforeShow: function(data) { | 22 onBeforeShow: function(data) { |
| 23 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.WRONG_HWID_WARNING; | 23 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.WRONG_HWID_WARNING; |
| 24 }, | 24 }, |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * Updates localized content of the screen that is not updated via template. | 27 * Updates localized content of the screen that is not updated via template. |
| 28 */ | 28 */ |
| 29 updateLocalizedContent: function() { | 29 updateLocalizedContent: function() { |
| 30 $('wrong-hwid-message-content').innerHTML = | 30 $('wrong-hwid-message-content').innerHTML = '<p>' + |
| 31 '<p>' + | 31 loadTimeData.getStringF( |
| 32 loadTimeData.getStringF('wrongHWIDMessageFirstPart', | 32 'wrongHWIDMessageFirstPart', '<strong>', '</strong>') + |
| 33 '<strong>', '</strong>') + | 33 '</p><p>' + loadTimeData.getString('wrongHWIDMessageSecondPart') + |
| 34 '</p><p>' + | |
| 35 loadTimeData.getString('wrongHWIDMessageSecondPart') + | |
| 36 '</p>'; | 34 '</p>'; |
| 37 } | 35 } |
| 38 }; | 36 }; |
| 39 }); | 37 }); |
| 40 | |
| OLD | NEW |