mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Fix bug 216245 subscribe/account wizard for newsgroups forgets account name. r=mnyromyr,sr=bienvenu
This commit is contained in:
parent
63a84e5ea4
commit
d7da455982
@ -294,12 +294,14 @@ function AccountDataToPageData(accountData, pageData)
|
||||
setPageData(pageData, "server", "servertype", server.type);
|
||||
setPageData(pageData, "server", "hostname", server.hostName);
|
||||
}
|
||||
setPageData(pageData, "accounttype", "otheraccount", false);
|
||||
}
|
||||
|
||||
setPageData(pageData, "login", "username", server.username);
|
||||
setPageData(pageData, "login", "password", server.password);
|
||||
setPageData(pageData, "login", "rememberPassword", server.rememberPassword);
|
||||
setPageData(pageData, "accname", "prettyName", server.prettyName);
|
||||
setPageData(pageData, "accname", "userset", false);
|
||||
|
||||
var identity;
|
||||
|
||||
@ -628,7 +630,7 @@ function setupCopiesAndFoldersServer(account, accountIsDeferred)
|
||||
if (!am.localFoldersServer)
|
||||
{
|
||||
dump("error! we should have a local mail server at this point\n");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
copiesAndFoldersServer = am.localFoldersServer;
|
||||
}
|
||||
|
@ -76,6 +76,8 @@ function acctNamePageValidate()
|
||||
}
|
||||
|
||||
setPageData(pageData, "accname", "prettyName", accountname);
|
||||
// Set this to true so we know the user has set the name.
|
||||
setPageData(pageData, "accname", "userset", true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -69,13 +69,20 @@ function setupWizardPanels() {
|
||||
}
|
||||
|
||||
var pageData = parent.GetPageData();
|
||||
|
||||
// We default this to false, even though we could set it to true if we
|
||||
// are going to display the page. However as the accname page will set
|
||||
// it to true for us, we'll just default it to false and not work it out
|
||||
// twice.
|
||||
setPageData(pageData, "accname", "userset", false);
|
||||
|
||||
// If we need to skip wizardpanels, set the wizard to jump to the
|
||||
// summary page i.e., last page. Otherwise, set the flow based
|
||||
// on type of account (mail or news) user is creating.
|
||||
var skipPanels = "";
|
||||
try {
|
||||
skipPanels = gCurrentAccountData.wizardSkipPanels.toString().toLowerCase();
|
||||
if (gCurrentAccountData.wizardSkipPanels)
|
||||
skipPanels = gCurrentAccountData.wizardSkipPanels.toString().toLowerCase();
|
||||
} catch(ex) {}
|
||||
|
||||
// "done" is the only required panel for all accounts. We used to require an identity panel but not anymore.
|
||||
@ -90,7 +97,7 @@ function setupWizardPanels() {
|
||||
wizardPanels = new Array("identitypage", "newsserver", "accnamepage");
|
||||
|
||||
// Create a hash table of the panels to skip
|
||||
skipArray = skipPanels.split(",");
|
||||
var skipArray = skipPanels.split(",");
|
||||
var skipHash = new Array();
|
||||
for (i = 0; i < skipArray.length; i++)
|
||||
skipHash[skipArray[i]] = skipArray[i];
|
||||
|
@ -106,10 +106,13 @@ function donePageInit() {
|
||||
if (pageData.accname && pageData.accname.prettyName) {
|
||||
accountName = pageData.accname.prettyName.value;
|
||||
|
||||
// If the AccountData exists, tha means we have values read from rdf file.
|
||||
// Only if the user hasn't set the account name should we use the
|
||||
// values from the rdf file - if the account data exists.
|
||||
// Get the pretty name and polish the account name
|
||||
if ( currentAccountData &&
|
||||
currentAccountData.incomingServer.prettyName)
|
||||
if (pageData.accname.userset &&
|
||||
!pageData.accname.userset.value &&
|
||||
currentAccountData &&
|
||||
currentAccountData.incomingServer.prettyName)
|
||||
{
|
||||
var prettyName = currentAccountData.incomingServer.prettyName;
|
||||
// Get the polished account name
|
||||
|
Loading…
x
Reference in New Issue
Block a user