mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
fix for 130761-able to enter smtp server in account creation;r=bhuvan;sr=dbienvenu;a=asa
This commit is contained in:
parent
4a127f8e62
commit
73da3c3144
@ -184,11 +184,10 @@ function FinishAccount() {
|
||||
|
||||
if (!accountData)
|
||||
{
|
||||
accountData = new Object;
|
||||
|
||||
// Time to set the smtpRequiresUsername attribute
|
||||
if (!serverIsNntp(pageData))
|
||||
SetSmtpRequiresUsernameAttribute(accountData);
|
||||
accountData = new Object;
|
||||
// Time to set the smtpRequiresUsername attribute
|
||||
if (!serverIsNntp(pageData))
|
||||
accountData.smtpRequiresUsername = true;
|
||||
}
|
||||
|
||||
PageDataToAccountData(pageData, accountData);
|
||||
@ -446,12 +445,16 @@ function finishAccount(account, accountData) {
|
||||
* default server is returned which is also set to create a new smtp server
|
||||
* (via GetDefaultServer()) if no default server is found.
|
||||
*/
|
||||
if (accountData.smtpCreateNewServer)
|
||||
smtpServer = smtpService.createSmtpServer();
|
||||
if (accountData.smtp.hostname != null)
|
||||
smtpServer = smtpService.createSmtpServer();
|
||||
else
|
||||
smtpServer = smtpService.defaultServer;
|
||||
smtpServer = smtpService.defaultServer;
|
||||
|
||||
dump("Copying smtpServer (" + smtpServer + ") to accountData\n");
|
||||
//set the smtp server to be the default only if it is not a redirectorType
|
||||
if (accountData.smtp.redirectorType == null)
|
||||
smtpService.defaultServer = smtpServer;
|
||||
|
||||
copyObjectToInterface(smtpServer, accountData.smtp);
|
||||
|
||||
// some identities have 'preferred'
|
||||
|
@ -130,12 +130,7 @@ function serverPageInit() {
|
||||
}
|
||||
|
||||
gPrefsBundle = document.getElementById("bundle_prefs");
|
||||
var smtpTextBox = document.getElementById("smtphostname");
|
||||
|
||||
var smtpServer = parent.smtpService.defaultServer;
|
||||
if (smtpTextBox && smtpTextBox.value == "" &&
|
||||
smtpServer.hostname)
|
||||
smtpTextBox.value = smtpServer.hostname;
|
||||
|
||||
// modify the value in the smtp display if we already have a
|
||||
// smtp server so that the single string displays the
|
||||
@ -162,9 +157,13 @@ function hideShowSmtpSettings(smtpServer) {
|
||||
var boxToHide;
|
||||
var boxToShow;
|
||||
|
||||
if (smtpServer && smtpServer.hostname &&
|
||||
smtpServer.hostname != "") {
|
||||
// we have a hostname, so show the static text
|
||||
if (smtpServer && smtpServer.hostname && smtpServer.redirectorType == null
|
||||
&& smtpServer.hostname != "") {
|
||||
// we have a hostname, so show the static text and
|
||||
// store the value of the default smtp server in the textbox.
|
||||
var smtpTextBox = document.getElementById("smtphostname");
|
||||
if (smtpTextBox && smtpTextBox.value == "")
|
||||
smtpTextBox.value = smtpServer.hostname;
|
||||
boxToShow = haveSmtpBox;
|
||||
boxToHide = noSmtpBox;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user