using System; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using CMS.GlobalHelper; using CMS.UIControls; using CMS.ExtendedControls; public partial class CMSMasterPages_UI_Dialogs_ModalSimplePage : CMSMasterPage { #region "Properties" /// /// PageTitle control. /// public override PageTitle Title { get { return titleElem; } } /// /// Gets the labels container. /// public override PlaceHolder PlaceholderLabels { get { return plcLabels; } } /// /// HeaderActions control. /// public override HeaderActions HeaderActions { get { if (base.HeaderActions != null) { return base.HeaderActions; } return actionsElem; } } /// /// Body panel. /// public override Panel PanelBody { get { return pnlBody; } } /// /// Body object. /// public override HtmlGenericControl Body { get { return bodyElem; } } /// /// Prepared for specifying the additional HEAD elements. /// public override Literal HeadElements { get { return ltlHeadElements; } set { ltlHeadElements = value; } } /// /// Gets placeholder located after form element. /// public override PlaceHolder AfterFormPlaceholder { get { return plcAfterForm; } } #endregion #region "Page events" protected override void OnInit(EventArgs e) { base.OnInit(e); PageStatusContainer = plcStatus; } protected void Page_Load(object sender, EventArgs e) { titleElem.HelpIconUrl = UIHelper.GetImageUrl(Page, "General/HelpLargeDark.png"); // Display panel with additional controls place holder if required if (DisplayControlsPanel) { pnlAdditionalControls.Visible = true; } // Display panel with site selector if (DisplaySiteSelectorPanel) { pnlSiteSelector.Visible = true; } // Set separator visibility pnlSeparator.Visible = DisplaySeparatorPanel; bodyElem.Attributes["class"] = mBodyClass; } protected override void Render(System.Web.UI.HtmlTextWriter writer) { // Hide actions panel if no actions are present and DisplayActionsPanel is false if (!DisplayActionsPanel) { if (!actionsElem.Visible && (plcActions.Controls.Count == 0)) { pnlActions.Visible = false; } } base.Render(writer); } #endregion }