Don't do postback for check of IDN domain name. Prohibit wrong use and show error
This commit is contained in:
parent
47f2c512b4
commit
cf749150c0
5 changed files with 48 additions and 22 deletions
|
@ -260,15 +260,27 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddDomain();
|
||||
if (CheckForCorrectIdnDomainUsage(DomainName.Text))
|
||||
{
|
||||
AddDomain();
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckForCorrectIdnDomainUsage(string domainName)
|
||||
{
|
||||
// If the choosen domain is a idn domain, don't allow to create mail
|
||||
if (Utils.IsIdnDomain(domainName) && PointMailDomain.Checked)
|
||||
{
|
||||
ShowErrorMessage("IDNDOMAIN_NO_MAIL");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void DomainName_TextChanged(object sender, DomainControl.DomainNameEventArgs e)
|
||||
{
|
||||
// If the choosen domain is a idn domain, don't allow to create mail
|
||||
var isIdn = Utils.IsIdnDomain(e.DomainName);
|
||||
PointMailDomainPanel.Enabled = !isIdn;
|
||||
PointMailDomain.Checked = !isIdn;
|
||||
CheckForCorrectIdnDomainUsage(e.DomainName);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue