Commit b4c6a042 authored by antrim@chromium.org's avatar antrim@chromium.org

LMU creation : nicer user/password error messages

BUG=229762
R=nkostylev@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16091004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202573 0039d316-1c4b-4281-b951-d872f2087c98
parent e2d31404
...@@ -480,11 +480,11 @@ Press any key to continue exploring. ...@@ -480,11 +480,11 @@ Press any key to continue exploring.
<message name="IDS_CREATE_LOCALLY_MANAGED_USER_INSTRUCTIONS_TEXT" desc="Messsage indicating that instructions will be sent to manager's email."> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_INSTRUCTIONS_TEXT" desc="Messsage indicating that instructions will be sent to manager's email.">
To configure this profile, please check your email at <ph name="MANAGER_EMAIL">$1<ex>john.doe@example.com</ex></ph> for further instructions. To configure this profile, please check your email at <ph name="MANAGER_EMAIL">$1<ex>john.doe@example.com</ex></ph> for further instructions.
</message> </message>
<message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_USERNAME_ALREADY_EXISTS" desc="Error text shown in locally managed user creation dialog when local account with suggested name already exists on machine."> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_USERNAME_ALREADY_EXISTS" desc="Error text shown in locally managed user creation dialog when local account with suggested name already exists on a device.">
User with name <ph name="USER_DISPLAY_NAME">$1<ex>John</ex></ph> already exists. Whoops, this name is already in use!
</message> </message>
<message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_PASSWORD_MISMATCH_ERROR" desc="Error text shown in locally managed user creation dialog when typed passwords does not match."> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_PASSWORD_MISMATCH_ERROR" desc="Error text shown in locally managed user creation dialog when typed passwords does not match.">
Passwords do not match. Whoops, passwords do not match!
</message> </message>
<message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_PASSWORD_TOO_SHORT" desc="Error text shown in locally managed user creation dialog when typed password is too short."> <message name="IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_PASSWORD_TOO_SHORT" desc="Error text shown in locally managed user creation dialog when typed password is too short.">
Password is too short. Password is too short.
......
...@@ -65,11 +65,6 @@ ...@@ -65,11 +65,6 @@
padding: 4px 6px; padding: 4px 6px;
} }
#managed-user-creation-flow-password-error {
height: 16px;
margin-top: 10px;
}
#managed-user-creation-flow-name-error, #managed-user-creation-flow-name-error,
#managed-user-creation-flow-password-error { #managed-user-creation-flow-password-error {
visibility: hidden; visibility: hidden;
...@@ -77,8 +72,7 @@ ...@@ -77,8 +72,7 @@
#managed-user-creation-flow-name-error.error, #managed-user-creation-flow-name-error.error,
#managed-user-creation-flow-password-error.error { #managed-user-creation-flow-password-error.error {
background: url('chrome://theme/IDR_WARNING') left top /24px no-repeat; color: rgb(207, 93, 70);
color: red;
padding-left: 28px; padding-left: 28px;
visibility: visible; visibility: visible;
} }
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
<div> <div>
<input id="managed-user-creation-flow-password" type="password" <input id="managed-user-creation-flow-password" type="password"
i18n-values="placeholder:createManagedUserPasswordHint" /> i18n-values="placeholder:createManagedUserPasswordHint" />
<span id="managed-user-creation-flow-password-error" class="no-error">
</span>
</div> </div>
<div> <div>
<input id="managed-user-creation-flow-password-confirm" <input id="managed-user-creation-flow-password-confirm"
...@@ -49,8 +51,6 @@ ...@@ -49,8 +51,6 @@
i18n-values="placeholder:createManagedUserPasswordConfirmHint" /> i18n-values="placeholder:createManagedUserPasswordConfirmHint" />
</div> </div>
</div> </div>
<div id="managed-user-creation-flow-password-error" class="no-error">
</div>
</div> </div>
<div id="managed-user-creation-flow-tutorial" class="step-no-logo" hidden> <div id="managed-user-creation-flow-tutorial" class="step-no-logo" hidden>
<div id="managed-user-creation-flow-tutorial-placeholder"> <div id="managed-user-creation-flow-tutorial-placeholder">
......
...@@ -179,9 +179,8 @@ void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName( ...@@ -179,9 +179,8 @@ void LocallyManagedUserCreationScreenHandler::HandleCheckLocallyManagedUserName(
if (NULL != UserManager::Get()-> if (NULL != UserManager::Get()->
FindLocallyManagedUser(CollapseWhitespace(name, true))) { FindLocallyManagedUser(CollapseWhitespace(name, true))) {
CallJS("login.LocallyManagedUserCreationScreen.managedUserNameError", CallJS("login.LocallyManagedUserCreationScreen.managedUserNameError",
name, l10n_util::GetStringFUTF16( name, l10n_util::GetStringUTF16(
IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_USERNAME_ALREADY_EXISTS, IDS_CREATE_LOCALLY_MANAGED_USER_CREATE_USERNAME_ALREADY_EXISTS));
name));
} else { } else {
CallJS("login.LocallyManagedUserCreationScreen.managedUserNameOk", name); CallJS("login.LocallyManagedUserCreationScreen.managedUserNameOk", name);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment