diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx
index 537240f1..49b87726 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomain.ascx.resx
@@ -139,7 +139,7 @@
Tick this checkbox if you need to access your web site or mailboxes before DNS propagation takes places. DNS propagation is the time required to spread the information about DNS zone all over the Internet. It could take up to 72 hours.
- Create a new web site and park this domain to the created web site.
+ Create a new web site.
Tick this checkbox if DNS zone for this domain will be located on name servers of your hosting provider. Make sure you changed name servers in the domain registrar control panel.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx
index cc6b133e..0a0fbe79 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/DomainsAddDomainSelectType.ascx.resx
@@ -112,16 +112,16 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Cancel
- Create a Top-Level Domain (TLD). This domain could be parked to a new web site.
+ Create a Top-Level Domain (TLD).
Domain
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx
index 3632e3db..b84c69b0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx
@@ -40,15 +40,18 @@
+
+
-
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs
index 541cc0bf..ff7be2f4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.cs
@@ -99,19 +99,40 @@ namespace WebsitePanel.Portal
// load package context
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
- if ((type == DomainType.DomainPointer || (type == DomainType.Domain && cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaAllocatedValue == 0)) && !IsPostBack)
+ if ((type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted)) && !IsPostBack)
{
- // bind mail domains
- MailDomainsList.DataSource = ES.Services.MailServers.GetMailDomains(PanelSecurity.PackageId, false);
- MailDomainsList.DataBind();
+ // bind web sites
+ WebSitesList.DataSource = ES.Services.WebServers.GetWebSites(PanelSecurity.PackageId, false);
+ WebSitesList.DataBind();
}
+ if ((type == DomainType.DomainPointer || (type == DomainType.Domain && cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaAllocatedValue == 0)) && !IsPostBack)
+ {
+ // bind mail domains
+ MailDomainsList.DataSource = ES.Services.MailServers.GetMailDomains(PanelSecurity.PackageId, false);
+ MailDomainsList.DataBind();
+ }
+
+
// create web site option
CreateWebSitePanel.Visible = (type == DomainType.Domain || type == DomainType.SubDomain)
&& cntx.Groups.ContainsKey(ResourceGroups.Web);
- CreateWebSite.Enabled = true;
- CreateWebSite.Checked &= CreateWebSitePanel.Visible;
+ if (PointWebSite.Checked)
+ {
+ CreateWebSite.Checked = false;
+ CreateWebSite.Enabled = false;
+ }
+ else
+ {
+ CreateWebSite.Enabled = true;
+ CreateWebSite.Checked &= CreateWebSitePanel.Visible;
+ }
+
+ // point Web site
+ PointWebSitePanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
+ && cntx.Groups.ContainsKey(ResourceGroups.Web) && WebSitesList.Items.Count > 0;
+ WebSitesList.Enabled = PointWebSite.Checked;
// point mail domain
PointMailDomainPanel.Visible = (type == DomainType.DomainPointer || (type == DomainType.Domain && cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaAllocatedValue == 0))
@@ -184,19 +205,27 @@ namespace WebsitePanel.Portal
// load package context
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
- if (type == DomainType.DomainPointer || (type == DomainType.Domain && cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaAllocatedValue == 0))
+ if (type == DomainType.DomainPointer || (type == DomainType.Domain && !cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaExhausted))
{
- if (PointMailDomain.Checked && MailDomainsList.Items.Count > 0)
- pointMailDomainId = Utils.ParseInt(MailDomainsList.SelectedValue, 0);
+
+ if (PointWebSite.Checked && WebSitesList.Items.Count > 0)
+ pointWebSiteId = Utils.ParseInt(WebSitesList.SelectedValue, 0);
}
+ if (type == DomainType.DomainPointer || (type == DomainType.Domain && cntx.Quotas[Quotas.OS_DOMAINPOINTERS].QuotaAllocatedValue == 0))
+ {
+ if (PointMailDomain.Checked && MailDomainsList.Items.Count > 0)
+ pointMailDomainId = Utils.ParseInt(MailDomainsList.SelectedValue, 0);
+ }
+
+
// add domain
int domainId = 0;
try
{
domainId = ES.Services.Servers.AddDomainWithProvisioning(PanelSecurity.PackageId,
domainName.ToLower(), type, CreateWebSite.Checked, pointWebSiteId, pointMailDomainId,
- EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, txtHostName.Text);
+ EnableDns.Checked, CreateInstantAlias.Checked, AllowSubDomains.Checked, (PointWebSite.Checked && WebSitesList.Items.Count > 0) ? string.Empty : txtHostName.Text);
if (domainId < 0)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs
index bfd6a8b4..0b33b63b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/DomainsAddDomain.ascx.designer.cs
@@ -174,6 +174,33 @@ namespace WebsitePanel.Portal {
///
protected global::System.Web.UI.WebControls.TextBox txtHostName;
+ ///
+ /// PointWebSitePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel PointWebSitePanel;
+
+ ///
+ /// PointWebSite control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox PointWebSite;
+
+ ///
+ /// WebSitesList control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList WebSitesList;
+
///
/// PointMailDomainPanel control.
///