/// <summary>
        /// Renders the controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="filterControl">The filter control.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="controls">The controls.</param>
        public override void RenderControls(Type entityType, FilterField filterControl, HtmlTextWriter writer, Control[] controls)
        {
            if (controls.Count() < 4)
            {
                return;
            }

            RegistrationTemplatePicker registrationTemplatePicker = controls[0] as RegistrationTemplatePicker;
            RockCheckBox cbIncludeInactiveRegistrationInstances   = controls[1] as RockCheckBox;
            PanelWidget  pwAdvanced = controls[3] as PanelWidget;

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "row");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            registrationTemplatePicker.RenderControl(writer);

            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            cbIncludeInactiveRegistrationInstances.ContainerCssClass = "margin-l-md";
            cbIncludeInactiveRegistrationInstances.RenderControl(writer);
            writer.RenderEndTag();

            writer.RenderEndTag();

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            pwAdvanced.RenderControl(writer);
            writer.RenderEndTag();

            writer.RenderEndTag();
        }
Beispiel #2
0
        /// <summary>
        /// Renders the controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="filterControl">The filter control.</param>
        /// <param name="writer">The writer.</param>
        /// <param name="controls">The controls.</param>
        public override void RenderControls(Type entityType, FilterField filterControl, HtmlTextWriter writer, Control[] controls)
        {
            if (controls.Count() < 9)
            {
                return;
            }

            GroupPicker      groupPicker                  = controls[0] as GroupPicker;
            RockCheckBox     cbChildGroups                = controls[1] as RockCheckBox;
            RockCheckBox     cbIncludeSelectedGroup       = controls[2] as RockCheckBox;
            RockCheckBox     cbChildGroupsPlusDescendants = controls[3] as RockCheckBox;
            RockCheckBoxList cblRoles                = controls[4] as RockCheckBoxList;
            RockDropDownList ddlGroupMemberStatus    = controls[5] as RockDropDownList;
            RockCheckBox     cbIncludeInactiveGroups = controls[6] as RockCheckBox;
            PanelWidget      pwAdvanced              = controls[8] as PanelWidget;

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "row");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            groupPicker.RenderControl(writer);
            cbChildGroups.RenderControl(writer);
            if (!cbChildGroups.Checked)
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Disabled, "disabled");
            }

            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            cbIncludeSelectedGroup.ContainerCssClass = "margin-l-md";
            cbIncludeSelectedGroup.RenderControl(writer);
            cbChildGroupsPlusDescendants.ContainerCssClass = "margin-l-md";
            cbChildGroupsPlusDescendants.RenderControl(writer);
            cbIncludeInactiveGroups.ContainerCssClass = "margin-l-md";
            cbIncludeInactiveGroups.RenderControl(writer);
            writer.RenderEndTag();

            writer.RenderEndTag();

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            cblRoles.RenderControl(writer);

            ddlGroupMemberStatus.RenderControl(writer);
            pwAdvanced.RenderControl(writer);
            writer.RenderEndTag();

            writer.RenderEndTag();
        }