Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2181)

Unified Diff: chrome/browser/resources/chromeos/login/screen_locally_managed_user_creation.js

Issue 22896002: Fix next button status, error bubble positions, initial focus on user name screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b685ed0975b042cee4861cb0bef0fbb425db3643..dfe83fc1e8c656c84c6a77d3eb10fbd242cb9650 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
@@ -529,7 +529,7 @@ login.createScreen('LocallyManagedUserCreationScreen',
* @private
*/
checkUserName_: function() {
- var userName = $('managed-user-creation-name').value;
+ var userName = this.getScreenElement('name').value;
// Avoid flickering
if (userName == this.lastIncorrectUserName_ ||
@@ -542,6 +542,7 @@ login.createScreen('LocallyManagedUserCreationScreen',
this.nameErrorVisible = false;
this.lastVerifiedName_ = null;
this.lastIncorrectUserName_ = null;
+ this.updateNextButtonForUser_();
}
},
@@ -554,7 +555,7 @@ login.createScreen('LocallyManagedUserCreationScreen',
this.lastIncorrectUserName_ = null;
if ($('managed-user-creation-name').value == name)
this.clearUserNameError_();
- this.updateNextButtonForManager_();
+ this.updateNextButtonForUser_();
},
/**
@@ -573,7 +574,7 @@ login.createScreen('LocallyManagedUserCreationScreen',
$('managed-user-creation-name'),
errorText,
cr.ui.Bubble.Attachment.RIGHT,
- 24, 4);
+ 12, 4);
this.setButtonDisabledStatus('next', true);
}
},
@@ -600,7 +601,7 @@ login.createScreen('LocallyManagedUserCreationScreen',
$('managed-user-creation-password'),
errorText,
cr.ui.Bubble.Attachment.RIGHT,
- 24, 4);
+ 12, 4);
$('managed-user-creation-password').classList.add('password-error');
$('managed-user-creation-password').focus();
this.disabled = false;
@@ -638,12 +639,12 @@ login.createScreen('LocallyManagedUserCreationScreen',
* @private
*/
updateNextButtonForUser_: function() {
- var firstPassword = $('managed-user-creation-password').value;
- var secondPassword =
- $('managed-user-creation-password-confirm').value;
- var userName = $('managed-user-creation-name').value;
+ var firstPassword = this.getScreenElement('password').value;
+ var secondPassword = this.getScreenElement('password-confirm').value;
+ var userName = this.getScreenElement('name').value;
var canProceed =
+ (userName.length > 0) &&
(firstPassword.length > 0) &&
(firstPassword.length == secondPassword.length) &&
this.lastVerifiedName_ &&
@@ -716,6 +717,8 @@ login.createScreen('LocallyManagedUserCreationScreen',
chrome.send('supervisedUserSelectImage',
[selected.url, 'default']);
this.getScreenElement('image-grid').redraw();
+ this.updateNextButtonForUser_();
+ this.getScreenElement('name').focus();
}
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698