зеркало из https://github.com/mozilla/pjs.git
Bug 600560 - Sync UI: Strength meter does not disappear when sync key field is cleared. r=mconnor a=blocking-beta8
This commit is contained in:
Родитель
16e1f3af71
Коммит
569ddcfc91
|
@ -341,7 +341,7 @@ var gSyncSetup = {
|
|||
// xxxmpc - hack, sigh
|
||||
if (el1.value == document.getElementById("weavePassword").value) {
|
||||
valid = false;
|
||||
str = Weave.Utils.getErrorString("change.passphrase.ppSameAsPassword");
|
||||
str = Weave.Utils.getErrorString("change.synckey.sameAsPassword");
|
||||
}
|
||||
else {
|
||||
[valid, str] = gSyncUtils.validatePassphrase(el1);
|
||||
|
@ -349,8 +349,11 @@ var gSyncSetup = {
|
|||
|
||||
let feedback = document.getElementById("passphraseFeedbackRow");
|
||||
this._setFeedback(feedback, valid, str);
|
||||
if (!valid)
|
||||
if (!valid) {
|
||||
// Hide strength meter if we're displaying an error.
|
||||
document.getElementById("passphraseStrengthRow").hidden = true;
|
||||
return valid;
|
||||
}
|
||||
|
||||
// No passphrase strength meter for the generated key.
|
||||
if (!this._haveCustomSyncKey)
|
||||
|
|
|
@ -299,7 +299,9 @@ let gSyncUtils = {
|
|||
let val = el.value;
|
||||
let error = "";
|
||||
|
||||
if (val == Weave.Service.username)
|
||||
if (val.length < Weave.MIN_PP_LENGTH)
|
||||
error = "change.synckey.tooShort";
|
||||
else if (val == Weave.Service.username)
|
||||
error = "change.synckey.sameAsUsername";
|
||||
else if (val == Weave.Service.account)
|
||||
error = "change.synckey.sameAsEmail";
|
||||
|
@ -307,8 +309,6 @@ let gSyncUtils = {
|
|||
error = "change.synckey.sameAsPassword";
|
||||
else if (change && val == Weave.Service.passphrase)
|
||||
error = "change.synckey.sameAsSyncKey";
|
||||
else if (val.length < Weave.MIN_PP_LENGTH)
|
||||
error = "change.synckey.tooShort";
|
||||
else
|
||||
valid = true;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче