Bug 741858 - Change stored password doorhanger doesn't handle large password string very well, r=margaret

Modifies the "Change login" dialog to be consistent with the "Save login" dialog
This commit is contained in:
Mark Capella 2012-08-21 14:49:53 -04:00
parent 40d9fa492d
commit d32739c243

View File

@ -334,13 +334,15 @@ LoginManagerPrompter.prototype = {
*/
_showChangeLoginNotification : function (aNativeWindow, aOldLogin, aNewPassword) {
var notificationText;
if (aOldLogin.username)
if (aOldLogin.username) {
let displayUser = this._sanitizeUsername(aOldLogin.username);
notificationText = this._getLocalizedString(
"passwordChangeText",
[aOldLogin.username]);
else
[displayUser]);
} else {
notificationText = this._getLocalizedString(
"passwordChangeTextNoUser");
}
var changeButtonText =
this._getLocalizedString("notifyBarChangeButtonText");
@ -392,13 +394,15 @@ LoginManagerPrompter.prototype = {
const buttonFlags = Ci.nsIPrompt.STD_YES_NO_BUTTONS;
var dialogText;
if (aOldLogin.username)
if (aOldLogin.username) {
let displayUser = this._sanitizeUsername(aOldLogin.username);
dialogText = this._getLocalizedString(
"passwordChangeText",
[aOldLogin.username]);
else
[displayUser]);
} else {
dialogText = this._getLocalizedString(
"passwordChangeTextNoUser");
}
var dialogTitle = this._getLocalizedString(
"passwordChangeTitle");