/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init" /> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs" /> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); HtmlMeta preventPhoneMetaTag = new HtmlMeta { Name = "format-detection", Content = "telephone=no" }; RockPage.AddMetaTag(this.Page, preventPhoneMetaTag); this.BlockUpdated += Block_BlockUpdated; btnCreateNewMessage.Visible = this.GetAttributeValue("EnableSmsSend").AsBoolean(); dvpNewPersonTitle.DefinedTypeId = DefinedTypeCache.Get(Rock.SystemGuid.DefinedType.PERSON_TITLE.AsGuid()).Id; dvpNewPersonSuffix.DefinedTypeId = DefinedTypeCache.Get(Rock.SystemGuid.DefinedType.PERSON_SUFFIX.AsGuid()).Id; dvpNewPersonMaritalStatus.DefinedTypeId = DefinedTypeCache.Get(Rock.SystemGuid.DefinedType.PERSON_MARITAL_STATUS.AsGuid()).Id; dvpNewPersonConnectionStatus.DefinedTypeId = DefinedTypeCache.Get(Rock.SystemGuid.DefinedType.PERSON_CONNECTION_STATUS.AsGuid()).Id; var groupType = GroupTypeCache.GetFamilyGroupType(); rblNewPersonRole.DataSource = groupType.Roles.OrderBy(r => r.Order).ToList(); rblNewPersonRole.DataBind(); rblNewPersonGender.Items.Clear(); rblNewPersonGender.Items.Add(new ListItem(Gender.Male.ConvertToString(), Gender.Male.ConvertToInt().ToString())); rblNewPersonGender.Items.Add(new ListItem(Gender.Female.ConvertToString(), Gender.Female.ConvertToInt().ToString())); rblNewPersonGender.Items.Add(new ListItem(Gender.Unknown.ConvertToString(), Gender.Unknown.ConvertToInt().ToString())); }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init" /> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs" /> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); newPersonEditor.ShowEmail = false; HtmlMeta preventPhoneMetaTag = new HtmlMeta { Name = "format-detection", Content = "telephone=no" }; RockPage.AddMetaTag(this.Page, preventPhoneMetaTag); this.BlockUpdated += Block_BlockUpdated; noteEditor.SaveButtonClick += noteEditor_SaveButtonClick; ConfigureNoteEditor(); btnCreateNewMessage.Visible = this.GetAttributeValue(AttributeKey.EnableSmsSend).AsBoolean(); //// Set postback timeout and request-timeout to whatever the DatabaseTimeout is plus an extra 5 seconds so that page doesn't timeout before the database does int databaseTimeout = GetAttributeValue(AttributeKey.DatabaseTimeoutSeconds).AsIntegerOrNull() ?? 180; var sm = ScriptManager.GetCurrent(this.Page); if (sm.AsyncPostBackTimeout < databaseTimeout + 5) { sm.AsyncPostBackTimeout = databaseTimeout + 5; Server.ScriptTimeout = databaseTimeout + 5; } }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init" /> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs" /> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); newPersonEditor.ShowEmail = false; HtmlMeta preventPhoneMetaTag = new HtmlMeta { Name = "format-detection", Content = "telephone=no" }; RockPage.AddMetaTag(this.Page, preventPhoneMetaTag); this.BlockUpdated += Block_BlockUpdated; btnCreateNewMessage.Visible = this.GetAttributeValue(AttributeKey.EnableSmsSend).AsBoolean(); }
/// <summary> /// Adds a meta tag to the page header priore to the page being rendered /// </summary> /// <param name="page">The page.</param> /// <param name="htmlMeta">The HTML meta tag.</param> public void AddMetaTag(System.Web.UI.Page page, HtmlMeta htmlMeta) { RockPage.AddMetaTag(page, htmlMeta); }