| Index: chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
|
| diff --git a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
|
| index 38a9ce2520b2ca0b00b0f99013fb22d6960139eb..092e8caca77de295d387d4b9d8ec61ceeaca537e 100644
|
| --- a/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
|
| +++ b/chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js
|
| @@ -211,6 +211,8 @@ cr.define('login', function() {
|
| lastIncorrectUserName_: null,
|
| managerList_: null,
|
|
|
| + currentPage_: null,
|
| +
|
| /** @override */
|
| decorate: function() {
|
| this.managerList_ = new ManagerPodList();
|
| @@ -322,7 +324,7 @@ cr.define('login', function() {
|
| e.stopPropagation();
|
| });
|
| cancelButton.addEventListener('click', function(e) {
|
| - creationFlowScreen.abortFlow_();
|
| + creationFlowScreen.cancel();
|
| e.stopPropagation();
|
| });
|
|
|
| @@ -524,6 +526,7 @@ cr.define('login', function() {
|
| var screen = $('managed-user-creation-flow-' + screenName);
|
| screen.hidden = (screenName != visiblePage);
|
| }
|
| + this.currentPage_ = visiblePage;
|
| },
|
|
|
| /**
|
| @@ -560,10 +563,6 @@ cr.define('login', function() {
|
| chrome.send('retryLocalManagedUserCreation');
|
| },
|
|
|
| - abortFlow_: function() {
|
| - chrome.send('abortLocalManagedUserCreation');
|
| - },
|
| -
|
| /**
|
| * Updates state of login header so that necessary buttons are displayed.
|
| **/
|
| @@ -620,6 +619,24 @@ cr.define('login', function() {
|
| if (userList.length > 0)
|
| this.managerList_.selectPod(this.managerList_.pods[0]);
|
| },
|
| +
|
| + /**
|
| + * Cancels user creation and drops to user screen (either sign).
|
| + */
|
| + cancel: function() {
|
| + var notSignedInScreens = ['initial'];
|
| + if (notSignedInScreens.indexOf(this.currentPage_) >= 0) {
|
| + // Make sure no manager password is kept:
|
| + this.managerList_.clearPods();
|
| +
|
| + $('pod-row').loadLastWallpaper();
|
| +
|
| + Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER});
|
| + Oobe.resetSigninUI(true);
|
| + return;
|
| + }
|
| + chrome.send('abortLocalManagedUserCreation');
|
| + },
|
| };
|
|
|
| LocallyManagedUserCreationScreen.showProgressScreen = function() {
|
| @@ -691,4 +708,3 @@ cr.define('login', function() {
|
| LocallyManagedUserCreationScreen: LocallyManagedUserCreationScreen
|
| };
|
| });
|
| -
|
|
|