checkbox - IgnoreDependencies for Application

This commit is contained in:
Sergey 2012-08-27 15:52:40 +03:00
parent 24ee7357c1
commit 7d10a750a0
6 changed files with 73 additions and 11 deletions

View file

@ -10,9 +10,12 @@
<div class="FormBody">
<uc1:SimpleMessageBox ID="messageBox" runat="server" />
<asp:CheckBox ID="chIgnoreDependencies" runat="server"
Text="Ignore these dependencies" Visible="false" AutoPostBack="True"
oncheckedchanged="chIgnoreDependencies_CheckedChanged" />
<uc1:WebApplicationGalleryHeader ID="appHeader" runat="server" />
</div>
<div class="FormFooter">
<asp:Button ID="btnInstall" runat="server" meta:resourcekey="btnInstall" Text="Install" CssClass="Button1" OnClick="btnInstall_Click" OnClientClick="ShowProgressDialog('Installing application...');"/>

View file

@ -64,6 +64,7 @@ namespace WebsitePanel.Portal
{
// app does not meet requirements
messageBox.ShowMessage(appResult, "WAG_CANNOT_INSTALL_APPLICATION", "WebAppGallery");
chIgnoreDependencies.Visible = true;
btnInstall.Enabled = false;
}
}
@ -118,5 +119,10 @@ namespace WebsitePanel.Portal
RedirectSpaceHomePage();
}
protected void chIgnoreDependencies_CheckedChanged(object sender, EventArgs e)
{
btnInstall.Enabled = chIgnoreDependencies.Checked;
}
}
}

View file

@ -30,6 +30,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// chIgnoreDependencies 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 chIgnoreDependencies;
/// <summary>
/// appHeader control.
/// </summary>

View file

@ -74,13 +74,13 @@ namespace WebsitePanel.Portal
// bind app details
appHeader.BindApplicationDetails(appResult.Value);
// check for warnings
if (appResult.ErrorCodes.Count > 0)
{
// app does not meet requirements
messageBox.ShowMessage(appResult, "WAG_CANNOT_INSTALL_APPLICATION", "WebAppGallery");
btnInstall.Enabled = false;
}
//// check for warnings
//if (appResult.ErrorCodes.Count > 0)
//{
// // app does not meet requirements
// messageBox.ShowMessage(appResult, "WAG_CANNOT_INSTALL_APPLICATION", "WebAppGallery");
// //btnInstall.Enabled = false;
//}
// bind app parameters
List<DeploymentParameter> parameters = GetApplicationParameters();