Update Website Pointers:
Code structured, Option Added to ignore GlobalDNSZone when creating additional website
This commit is contained in:
parent
c39dd51260
commit
4b0a56c3cd
12 changed files with 143 additions and 81 deletions
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAdd.Text" xml:space="preserve">
|
||||
<value>Add Pointer</value>
|
||||
|
@ -124,6 +124,6 @@
|
|||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="lblDomainName.Text" xml:space="preserve">
|
||||
<value>Domain Alias:</value>
|
||||
<value>Web Site Pointer:</value>
|
||||
</data>
|
||||
</root>
|
|
@ -112,10 +112,10 @@
|
|||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnAdd.OnClientClick" xml:space="preserve">
|
||||
<value>ShowProgressDialog('Creating web site...');</value>
|
||||
|
@ -126,11 +126,14 @@
|
|||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="chkIgnoreGlobalDNSRecords.Text" xml:space="preserve">
|
||||
<value>Ignore Zone Template</value>
|
||||
</data>
|
||||
<data name="lblAspNetVersion.Text" xml:space="preserve">
|
||||
<value>ASP.NET Version:</value>
|
||||
</data>
|
||||
<data name="lblDomainName.Text" xml:space="preserve">
|
||||
<value>Domain Name:</value>
|
||||
<value>Site:</value>
|
||||
</data>
|
||||
<data name="lblIPAddress.Text" xml:space="preserve">
|
||||
<value>IP address:</value>
|
||||
|
@ -138,6 +141,9 @@
|
|||
<data name="lblIPHelp.Text" xml:space="preserve">
|
||||
<value>If you need your web site to be accessible via dedicated IP address or you are planning to enable SSL for your site you should choose "Dedicated IP" option; otherwise leave this settings by default. In order to create IP-based site you need to purchase IP address from your host.</value>
|
||||
</data>
|
||||
<data name="lblIPHelp2.Text" xml:space="preserve">
|
||||
<value>Note: A Zone Template is often defined by your host and contains additional Web Site Pointers to create when creating a new Web Site. Static record definitions such as 'www' conflicts when creating an additional Web Site in the same Domain. </p>Check this option to ignore the Zone Template and create the new Web Site with this Web Site Pointer only. </value>
|
||||
</data>
|
||||
<data name="rbDedicatedIP.Text" xml:space="preserve">
|
||||
<value>Dedicated</value>
|
||||
</data>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<asp:Label ID="lblDomainName" runat="server" meta:resourcekey="lblDomainName" Text="Domain name:"></asp:Label>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox>.<uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
|
||||
<asp:TextBox ID="txtHostName" runat="server" CssClass="TextBox100" MaxLength="64" Text="www"></asp:TextBox> . <uc1:DomainsSelectDomainControl ID="domainsSelectDomainControl" runat="server" HideWebSites="true" HideDomainPointers="true" />
|
||||
<asp:RequiredFieldValidator ID="valRequireHostName" runat="server" meta:resourcekey="valRequireHostName" ControlToValidate="txtHostName"
|
||||
ErrorMessage="Enter hostname" ValidationGroup="CreateSite" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valRequireCorrectHostName" runat="server"
|
||||
|
@ -19,6 +19,21 @@
|
|||
meta:resourcekey="valRequireCorrectHostName" ValidationExpression="^([0-9a-zA-Z])*[0-9a-zA-Z]+$" SetFocusOnError="True"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" nowrap rowspan="2"></td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="chkIgnoreGlobalDNSRecords" runat="server" meta:resourcekey="chkIgnoreGlobalDNSRecords"
|
||||
Text="This hostname only, Ignore Zone Template" Checked="True" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal">
|
||||
<div class="Small" style="padding-top: 10px;">
|
||||
<asp:Label ID="lblIgnoreGlobalDNSRecords" runat="server" meta:resourcekey="lblIPHelp2" Text="If you need your site..."></asp:Label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/>
|
||||
|
|
|
@ -53,6 +53,8 @@ namespace WebsitePanel.Portal
|
|||
// bind IP Addresses
|
||||
BindIPAddresses();
|
||||
|
||||
BindIgnoreZoneTemplate();
|
||||
|
||||
// toggle
|
||||
ToggleControls();
|
||||
}
|
||||
|
@ -63,6 +65,19 @@ namespace WebsitePanel.Portal
|
|||
rowDedicatedIP.Visible = rbDedicatedIP.Checked;
|
||||
}
|
||||
|
||||
private void BindIgnoreZoneTemplate()
|
||||
{
|
||||
/*
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas[Quotas.WEB_SITES].QuotaUsedValue > 0)
|
||||
chkIgnoreGlobalDNSRecords.Visible = chkIgnoreGlobalDNSRecords.Checked = lblIgnoreGlobalDNSRecords.Visible = true;
|
||||
else
|
||||
chkIgnoreGlobalDNSRecords.Visible = chkIgnoreGlobalDNSRecords.Checked = lblIgnoreGlobalDNSRecords.Visible= false;
|
||||
*/
|
||||
|
||||
chkIgnoreGlobalDNSRecords.Checked = false;
|
||||
}
|
||||
|
||||
private void BindIPAddresses()
|
||||
{
|
||||
ddlIpAddresses.Items.Add(new ListItem("<Select IP>", ""));
|
||||
|
@ -92,7 +107,7 @@ namespace WebsitePanel.Portal
|
|||
int packageAddressId = rbDedicatedIP.Checked ? Utils.ParseInt(ddlIpAddresses.SelectedValue, 0) : 0;
|
||||
|
||||
siteItemId = ES.Services.WebServers.AddWebSite(PanelSecurity.PackageId, txtHostName.Text.ToLower(), domainsSelectDomainControl.DomainId,
|
||||
packageAddressId);
|
||||
packageAddressId, chkIgnoreGlobalDNSRecords.Checked);
|
||||
|
||||
if (siteItemId < 0)
|
||||
{
|
||||
|
|
|
@ -66,6 +66,24 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator valRequireCorrectHostName;
|
||||
|
||||
/// <summary>
|
||||
/// chkIgnoreGlobalDNSRecords control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkIgnoreGlobalDNSRecords;
|
||||
|
||||
/// <summary>
|
||||
/// lblIgnoreGlobalDNSRecords control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblIgnoreGlobalDNSRecords;
|
||||
|
||||
/// <summary>
|
||||
/// rowSiteIP control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue