From 943c38f057d4cdd5368b68e60336028a0083d17a Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Thu, 24 Apr 2014 11:07:48 +0400 Subject: [PATCH] fix archiving --- .../WebsitePanel_SharedResources.ascx.resx | 7 ++- .../ExchangeAddMailboxPlan.ascx.resx | 5 +- .../ExchangeMailboxPlans.ascx.resx | 6 +-- .../ExchangeAddMailboxPlan.ascx | 6 +-- .../ExchangeAddMailboxPlan.ascx.cs | 52 +++++++++++++++++-- .../ExchangeAddMailboxPlan.ascx.designer.cs | 30 +---------- .../ExchangeServer/ExchangeMailboxPlans.ascx | 2 +- .../ExchangeMailboxPlans.ascx.cs | 23 ++++++++ .../ExchangeRetentionPolicyTag.ascx | 10 +--- .../ExchangeRetentionPolicyTag.ascx.cs | 9 ++-- ...xchangeRetentionPolicyTag.ascx.designer.cs | 18 ------- .../SettingsExchangeMailboxPlansPolicy.ascx | 6 +-- ...SettingsExchangeMailboxPlansPolicy.ascx.cs | 16 ++++-- .../SettingsExchangeRetentionPolicyTag.ascx | 3 +- ...SettingsExchangeRetentionPolicyTag.ascx.cs | 11 ++-- 15 files changed, 114 insertions(+), 90 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 560eb62f..77c3ab4e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5431,8 +5431,8 @@ Professional - - Allow Archiving + + Allow Retention policy Archiving storage, MB @@ -5449,4 +5449,7 @@ Retention policy updated + + Archiving Mailboxes per Organization + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeAddMailboxPlan.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeAddMailboxPlan.ascx.resx index 51a4e3a7..7f3b1087 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeAddMailboxPlan.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeAddMailboxPlan.ascx.resx @@ -193,7 +193,7 @@ Mailbox plan - Please enter correct mailboxplan + Please enter correct name * @@ -219,4 +219,7 @@ Add Retention policy + + Retention policy + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPlans.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPlans.ascx.resx index 30cb11b8..612fcb1e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPlans.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/ExchangeMailboxPlans.ascx.resx @@ -127,7 +127,7 @@ Set Default Mailbox plan - if(!confirm('Are you sure you want to delete selected mailbox plan?')) return false; else ShowProgressDialog('Deleting Mailbox plan...'); + if(!confirm('Are you sure you want to delete selected?')) return false; else ShowProgressDialog('Deleting plan...'); Delete @@ -136,13 +136,13 @@ Delete Mailbox plan - Mailbox plan + Name Default - No mailbox plans have been added yet. To add a new mailbox plan click "Add New Mailbox plan" button. + No plans have been added yet. To add a new plan click "Add New" button. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx index a2c3f267..c173f224 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx @@ -37,7 +37,7 @@ + ErrorMessage="Enter name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"> @@ -280,7 +280,7 @@
- +
@@ -288,7 +288,7 @@
- +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.cs index a972defa..40361bd5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2014, Outercurve Foundation. +// Copyright (c) 2014, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,6 +38,7 @@ using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.Common; +using WebsitePanel.Portal.SkinControls; namespace WebsitePanel.Portal.ExchangeServer { @@ -57,12 +58,30 @@ namespace WebsitePanel.Portal.ExchangeServer } } + private Control FindControlRecursive(Control rootControl, string controlID) + { + if (rootControl.ID == controlID) return rootControl; + + foreach (Control controlToSearch in rootControl.Controls) + { + Control controlToReturn = + FindControlRecursive(controlToSearch, controlID); + if (controlToReturn != null) return controlToReturn; + } + return null; + } + + private string MainValidationGroup + { + get { return RetentionPolicy ? "CreateRetentionPolicy" : "CreateMailboxPlan"; } + } + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { - PackageContext cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId); + PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); if (PanelRequest.GetInt("MailboxPlanId") != 0) { @@ -83,8 +102,6 @@ namespace WebsitePanel.Portal.ExchangeServer ViewState["Tags"] = tags; gvPolicy.DataSource = tags; gvPolicy.DataBind(); - UpdateTags(); - } else { @@ -180,13 +197,32 @@ namespace WebsitePanel.Portal.ExchangeServer recoverableItemsWarning.ValueKB = 95; RetentionPolicy = PanelRequest.GetBool("archiving", false); + + if (RetentionPolicy) + { + chkEnableArchiving.Checked = true; + archiveQuota.QuotaValue = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue; + archiveWarningQuota.ValueKB = 95; + } } } else this.DisableControls = true; } + if (RetentionPolicy) + UpdateTags(); + locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleArchiving.Text") : GetLocalizedString("locTitle.Text"); + secMailboxPlan.Text = RetentionPolicy ? GetLocalizedString("secMailboxPlanArchiving.Text") : GetLocalizedString("secMailboxPlan.Text"); + UserSpaceBreadcrumb bc = FindControlRecursive(Page, "breadcrumb") as UserSpaceBreadcrumb; + if (bc != null) + { + Label lbOrgCurPage = bc.FindControl("lbOrgCurPage") as Label; + if (lbOrgCurPage != null) + lbOrgCurPage.Text = locTitle.Text; + } + secMailboxFeatures.Visible = !RetentionPolicy; secMailboxGeneral.Visible = !RetentionPolicy; @@ -197,7 +233,8 @@ namespace WebsitePanel.Portal.ExchangeServer secArchiving.Visible = RetentionPolicy; secRetentionPolicyTags.Visible = RetentionPolicy; - btnAdd.CausesValidation = RetentionPolicy; + valRequireMailboxPlan.ValidationGroup = MainValidationGroup; + btnAdd.ValidationGroup = MainValidationGroup; } @@ -228,6 +265,11 @@ namespace WebsitePanel.Portal.ExchangeServer protected void btnAdd_Click(object sender, EventArgs e) { + Page.Validate(MainValidationGroup); + + if (!Page.IsValid) + return; + AddMailboxPlan(); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.designer.cs index 3d455e8f..89d38680 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeAddMailboxPlan.ascx.designer.cs @@ -1,32 +1,4 @@ -// Copyright (c) 2014, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx index fce19b0a..1eeffeb6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx @@ -54,7 +54,7 @@   + meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected?')" > diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs index 19a94a88..e686cacb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeMailboxPlans.ascx.cs @@ -28,8 +28,10 @@ using System; using System.Web.UI.WebControls; +using System.Web.UI; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Portal.SkinControls; namespace WebsitePanel.Portal.ExchangeServer { @@ -43,12 +45,33 @@ namespace WebsitePanel.Portal.ExchangeServer } } + private Control FindControlRecursive(Control rootControl, string controlID) + { + if (rootControl.ID == controlID) return rootControl; + + foreach (Control controlToSearch in rootControl.Controls) + { + Control controlToReturn = + FindControlRecursive(controlToSearch, controlID); + if (controlToReturn != null) return controlToReturn; + } + return null; + } protected void Page_Load(object sender, EventArgs e) { locTitle.Text = RetentionPolicy ? GetLocalizedString("locTitleRetentionPolicy.Text") : GetLocalizedString("locTitle.Text"); + + UserSpaceBreadcrumb bc = FindControlRecursive(Page, "breadcrumb") as UserSpaceBreadcrumb; + if (bc != null) + { + Label lbOrgCurPage = bc.FindControl("lbOrgCurPage") as Label; + if (lbOrgCurPage!=null) + lbOrgCurPage.Text = GetLocalizedString( RetentionPolicy ? "Text.PageRetentionPolicyName" : "Text.PageName"); + } gvMailboxPlans.Columns[2].Visible = !RetentionPolicy; btnSetDefaultMailboxPlan.Visible = !RetentionPolicy; + secMainTools.Visible = !RetentionPolicy; if (!IsPostBack) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx index 2f17136e..6a51b96d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx @@ -5,23 +5,18 @@ <%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> <%@ Register Src="../UserControls/QuotaEditor.ascx" TagName="QuotaEditor" TagPrefix="uc1" %> <%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> -<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> <%@ Import Namespace="WebsitePanel.Portal" %>
-
- -
-
- +
@@ -70,8 +65,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.cs index f408cb91..cd947f14 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.cs @@ -193,6 +193,10 @@ namespace WebsitePanel.Portal.ExchangeServer protected void btnUpdatePolicy_Click(object sender, EventArgs e) { + Page.Validate("CreatePolicy"); + + if (!Page.IsValid) + return; if (ViewState["PolicyID"] == null) return; @@ -230,11 +234,6 @@ namespace WebsitePanel.Portal.ExchangeServer } - protected void txtPolicy_TextChanged(object sender, EventArgs e) - { - btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true; - } - public string GetTagType(int ItemID) { string imgName = string.Empty; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.designer.cs index d062e890..edf7a9ed 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeRetentionPolicyTag.ascx.designer.cs @@ -12,24 +12,6 @@ namespace WebsitePanel.Portal.ExchangeServer { public partial class ExchangeRetentionPolicyTag { - /// - /// breadcrumb control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; - - /// - /// menu control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; - /// /// Image1 control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx index 855b6a24..9bab5526 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx @@ -32,7 +32,7 @@   + meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected plan?')"> @@ -66,7 +66,7 @@ + ErrorMessage="Enter name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"> @@ -317,7 +317,7 @@
- +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx.cs index 7bee29dc..c5d8956e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeMailboxPlansPolicy.ascx.cs @@ -63,6 +63,11 @@ namespace WebsitePanel.Portal } } + private string MainValidationGroup + { + get { return RetentionPolicy ? "CreateRetentionPolicy" : "CreateMailboxPlan"; } + } + public void BindSettings(UserSettings settings) { @@ -84,8 +89,9 @@ namespace WebsitePanel.Portal gvMailboxPlans.Columns[4].Visible = !RetentionPolicy; gvMailboxPlans.Columns[5].Visible = !RetentionPolicy; - btnAddMailboxPlan.CausesValidation = RetentionPolicy; - btnUpdateMailboxPlan.CausesValidation = RetentionPolicy; + btnAddMailboxPlan.ValidationGroup = MainValidationGroup; + btnUpdateMailboxPlan.ValidationGroup = MainValidationGroup; + valRequireMailboxPlan.ValidationGroup = MainValidationGroup; UpdateTags(); @@ -125,7 +131,7 @@ namespace WebsitePanel.Portal public void btnAddMailboxPlan_Click(object sender, EventArgs e) { if (!RetentionPolicy) - Page.Validate("CreateMailboxPlan"); + Page.Validate(MainValidationGroup); if (!Page.IsValid) return; @@ -404,6 +410,10 @@ namespace WebsitePanel.Portal protected void btnUpdateMailboxPlan_Click(object sender, EventArgs e) { + Page.Validate(MainValidationGroup); + + if (!Page.IsValid) + return; if (ViewState["MailboxPlanID"] == null) return; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx index 988cdb78..51caa706 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx @@ -43,8 +43,7 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx.cs index 916b793e..43a6ac7a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsExchangeRetentionPolicyTag.ascx.cs @@ -258,6 +258,10 @@ namespace WebsitePanel.Portal protected void btnUpdatePolicy_Click(object sender, EventArgs e) { + Page.Validate("CreatePolicy"); + + if (!Page.IsValid) + return; if (ViewState["PolicyID"] == null) return; @@ -313,12 +317,5 @@ namespace WebsitePanel.Portal BindRetentionPolicy(); } - - protected void txtPolicy_TextChanged(object sender, EventArgs e) - { - btnUpdatePolicy.Enabled = (string.IsNullOrEmpty(txtPolicy.Text)) ? false : true; - } - - } } \ No newline at end of file