Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| index db9ff4f724cc420d9982077d2f45010737f978e3..9fc14fad3adf5262cd8d8249f2b74f6ef37cf93a 100644 |
| --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| @@ -23,7 +23,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| 'doReload', |
| 'onWebviewError', |
| 'onFrameError', |
| - 'updateCancelButtonState' |
| + 'updateCancelButtonState', |
| + 'showWhitelistCheckFailedError' |
| ], |
| /** |
| @@ -750,6 +751,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| $('pod-row').loadLastWallpaper(); |
| Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER}); |
| + this.classList.remove('whitelist-error'); |
| Oobe.resetSigninUI(true); |
| }, |
| @@ -773,5 +775,24 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| onWebviewError: function(data) { |
| chrome.send('webviewLoadAborted', [data.error]); |
| }, |
| + |
| + /** |
| + * Show/Hide error when user is not in whitelist. When UI is hidden |
| + * GAIA is reloaded. |
| + * @param {boolean} show Show/hide error UI. |
| + * @param {!Object} opt_data Optional additional information. |
| + */ |
| + showWhitelistCheckFailedError: function(show, opt_data) { |
|
dzhioev (left Google)
2015/04/07 17:16:57
Are you planning to use |opt_data| for something m
Nikita (slow)
2015/04/08 16:55:20
Seems to be a better way to handle the fact that i
Nikita (slow)
2015/04/08 16:55:20
Done.
|
| + if (opt_data) { |
| + $('gaia-whitelist-error').enterpriseManaged = |
| + opt_data.enterpriseManaged; |
| + } |
| + |
| + this.classList.toggle('whitelist-error', show); |
| + this.loading = !show; |
| + |
| + if (!show) |
| + Oobe.showSigninUI(); |
| + }, |
| }; |
| }); |