fix archiving
This commit is contained in:
parent
969d0bdb11
commit
943c38f057
15 changed files with 114 additions and 90 deletions
|
@ -5431,8 +5431,8 @@
|
|||
<data name="HostedCRM.LicenseProfessional" xml:space="preserve">
|
||||
<value>Professional</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.AllowArchiving" xml:space="preserve">
|
||||
<value>Allow Archiving</value>
|
||||
<data name="Quota.Exchange2013.AllowRetentionPolicy" xml:space="preserve">
|
||||
<value>Allow Retention policy</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.ArchivingStorage" xml:space="preserve">
|
||||
<value>Archiving storage, MB</value>
|
||||
|
@ -5449,4 +5449,7 @@
|
|||
<data name="Success.EXCHANGE_UPDATERETENTIONPOLICY" xml:space="preserve">
|
||||
<value>Retention policy updated</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2013.ArchivingMailboxes" xml:space="preserve">
|
||||
<value>Archiving Mailboxes per Organization</value>
|
||||
</data>
|
||||
</root>
|
|
@ -193,7 +193,7 @@
|
|||
<value>Mailbox plan</value>
|
||||
</data>
|
||||
<data name="valRequireMailboxPlan.ErrorMessage" xml:space="preserve">
|
||||
<value>Please enter correct mailboxplan</value>
|
||||
<value>Please enter correct name</value>
|
||||
</data>
|
||||
<data name="valRequireMailboxPlan.Text" xml:space="preserve">
|
||||
<value>*</value>
|
||||
|
@ -219,4 +219,7 @@
|
|||
<data name="locTitleArchiving.Text" xml:space="preserve">
|
||||
<value>Add Retention policy</value>
|
||||
</data>
|
||||
<data name="secMailboxPlanArchiving.Text" xml:space="preserve">
|
||||
<value>Retention policy</value>
|
||||
</data>
|
||||
</root>
|
|
@ -127,7 +127,7 @@
|
|||
<value>Set Default Mailbox plan</value>
|
||||
</data>
|
||||
<data name="cmdDelete.OnClientClick" xml:space="preserve">
|
||||
<value>if(!confirm('Are you sure you want to delete selected mailbox plan?')) return false; else ShowProgressDialog('Deleting Mailbox plan...');</value>
|
||||
<value>if(!confirm('Are you sure you want to delete selected?')) return false; else ShowProgressDialog('Deleting plan...');</value>
|
||||
</data>
|
||||
<data name="cmdDelete.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
|
@ -136,13 +136,13 @@
|
|||
<value>Delete Mailbox plan</value>
|
||||
</data>
|
||||
<data name="gvMailboxPlan.Header" xml:space="preserve">
|
||||
<value>Mailbox plan</value>
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="gvMailboxPlanDefault.Header" xml:space="preserve">
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="gvMailboxPlans.Empty" xml:space="preserve">
|
||||
<value>No mailbox plans have been added yet. To add a new mailbox plan click "Add New Mailbox plan" button.</value>
|
||||
<value>No plans have been added yet. To add a new plan click "Add New" button.</value>
|
||||
</data>
|
||||
<data name="HSFormComments.Text" xml:space="preserve">
|
||||
<value />
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<td>
|
||||
<asp:TextBox ID="txtMailboxPlan" runat="server" CssClass="TextBox200" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireMailboxPlan" runat="server" meta:resourcekey="valRequireMailboxPlan" ControlToValidate="txtMailboxPlan"
|
||||
ErrorMessage="Enter mailbox plan name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
ErrorMessage="Enter name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -280,7 +280,7 @@
|
|||
<br />
|
||||
|
||||
<asp:DropDownList ID="ddTags" runat ="server"></asp:DropDownList>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click"/>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click" CausesValidation="false"/>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
@ -288,7 +288,7 @@
|
|||
|
||||
<br />
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnAdd" runat="server" Text="Add Mailboxplan" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="CreateMailboxPlan" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Creating Mailboxplan...');"></asp:Button>
|
||||
<asp:Button id="btnAdd" runat="server" Text="Add Mailboxplan" CssClass="Button1" meta:resourcekey="btnAdd" ValidationGroup="CreateMailboxPlan" OnClick="btnAdd_Click" OnClientClick="ShowProgressDialog('Creating ...');"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailboxPlan" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgDelMailboxPlan" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("MailboxPlanId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected mailbox plan?')" ></asp:ImageButton>
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected?')" ></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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" %>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Header">
|
||||
<wsp:breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
|
||||
</div>
|
||||
<div class="Left">
|
||||
<wsp:menu id="menu" runat="server" SelectedItem="domains" />
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="ExchangeDomainName48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server"></asp:Localize>
|
||||
<asp:Localize ID="locTitle" runat="server" Text="Retention policy tag"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
@ -70,8 +65,7 @@
|
|||
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"
|
||||
ontextchanged="txtPolicy_TextChanged" ></asp:TextBox>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequirePolicy" runat="server" meta:resourcekey="valRequirePolicy" ControlToValidate="txtPolicy"
|
||||
ErrorMessage="Enter policy tag name" ValidationGroup="CreatePolicy" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -12,24 +12,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
|
||||
public partial class ExchangeRetentionPolicyTag {
|
||||
|
||||
/// <summary>
|
||||
/// breadcrumb control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
|
||||
|
||||
/// <summary>
|
||||
/// menu control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
|
||||
|
||||
/// <summary>
|
||||
/// Image1 control.
|
||||
/// </summary>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<ItemTemplate>
|
||||
<asp:ImageButton id="imgDelMailboxPlan" runat="server" Text="Delete" SkinID="ExchangeDelete"
|
||||
CommandName="DeleteItem" CommandArgument='<%# Eval("MailboxPlanId") %>'
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected mailbox plan?')"></asp:ImageButton>
|
||||
meta:resourcekey="cmdDelete" OnClientClick="return confirm('Are you sure you want to delete selected plan?')"></asp:ImageButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<asp:TextBox ID="txtMailboxPlan" runat="server" CssClass="TextBox200"
|
||||
ontextchanged="txtMailboxPlan_TextChanged" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireMailboxPlan" runat="server" meta:resourcekey="valRequireMailboxPlan" ControlToValidate="txtMailboxPlan"
|
||||
ErrorMessage="Enter mailbox plan name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
ErrorMessage="Enter name" ValidationGroup="CreateMailboxPlan" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -317,7 +317,7 @@
|
|||
<br />
|
||||
|
||||
<asp:DropDownList ID="ddTags" runat ="server"></asp:DropDownList>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click"/>
|
||||
<asp:Button ID="bntAddTag" runat="server" Text="Add tag" meta:resourcekey="bntAddTag" OnClick="bntAddTag_Click" CausesValidation="false"/>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -43,8 +43,7 @@
|
|||
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"
|
||||
ontextchanged="txtPolicy_TextChanged" ></asp:TextBox>
|
||||
<asp:TextBox ID="txtPolicy" runat="server" CssClass="TextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequirePolicy" runat="server" meta:resourcekey="valRequirePolicy" ControlToValidate="txtPolicy"
|
||||
ErrorMessage="Enter policy tag name" ValidationGroup="CreatePolicy" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue