/// <summary> /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering. /// </summary> protected override void CreateChildControls() { base.CreateChildControls(); Controls.Clear(); RockControlHelper.CreateChildControls(this, Controls); _registrationTemplatePicker = new RegistrationTemplatePicker(); _registrationTemplatePicker.ID = this.ID + "_registrationTemplatePicker"; _registrationTemplatePicker.SelectItem += _ddlRegistrationTemplate_SelectedIndexChanged; _registrationTemplatePicker.Label = "Registration Template"; Controls.Add(_registrationTemplatePicker); _ddlRegistrationInstance = new RockDropDownList(); _ddlRegistrationInstance.ID = this.ID + "_ddlRegistrationInstance"; _ddlRegistrationInstance.Label = "Registration Instance"; Controls.Add(_ddlRegistrationInstance); }
/// <summary> /// Creates the child controls. /// </summary> /// <returns></returns> public override Control[] CreateChildControls( Type entityType, FilterField filterControl ) { rp = new RegistrationTemplatePicker(); rp.ID = filterControl.ID + "_rp"; rp.Label = "RegistrationTemplate(s)"; rp.CssClass = "js-group-picker"; rp.AllowMultiSelect = true; rp.Help = "Select the registration templates that you want the registrants for. Leaving this blank will not restrict results to a registration template."; filterControl.Controls.Add( rp ); cbIncludeInactiveRegistrationInstances = new RockCheckBox(); cbIncludeInactiveRegistrationInstances.ID = filterControl.ID + "_cbIncludeInactiveRegistrationInstances"; cbIncludeInactiveRegistrationInstances.Text = "Include Inactive Registration Instances"; cbIncludeInactiveRegistrationInstances.CssClass = "js-include-inactive-groups"; cbIncludeInactiveRegistrationInstances.AutoPostBack = true; filterControl.Controls.Add( cbIncludeInactiveRegistrationInstances ); PanelWidget pwAdvanced = new PanelWidget(); filterControl.Controls.Add( pwAdvanced ); pwAdvanced.ID = filterControl.ID + "_pwAttributes"; pwAdvanced.Title = "Advanced Filters"; pwAdvanced.CssClass = "advanced-panel"; SlidingDateRangePicker registeredOnDateRangePicker = new SlidingDateRangePicker(); registeredOnDateRangePicker.ID = pwAdvanced.ID + "_addedOnDateRangePicker"; registeredOnDateRangePicker.AddCssClass( "js-sliding-date-range" ); registeredOnDateRangePicker.Label = "Date Registered:"; registeredOnDateRangePicker.Help = "Select the date range that the person was registered. Leaving this blank will not restrict results to a date range."; pwAdvanced.Controls.Add( registeredOnDateRangePicker ); return new Control[4] { rp, cbIncludeInactiveRegistrationInstances, registeredOnDateRangePicker, pwAdvanced }; }