Inheritance: RockTextBox
Beispiel #1
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var comparisonControl = this.ComparisonControl( ComparisonType.LessThan | ComparisonType.GreaterThanOrEqualTo );
            comparisonControl.ID = filterControl.ID + "_0";
            filterControl.Controls.Add( comparisonControl );

            var globalAttributes = Rock.Web.Cache.GlobalAttributesCache.Read();

            NumberBox numberBoxAmount = new NumberBox();
            numberBoxAmount.PrependText = globalAttributes.GetValue("CurrencySymbol") ?? "$";
            numberBoxAmount.NumberType = ValidationDataType.Currency;
            numberBoxAmount.ID = filterControl.ID + "_1";
            numberBoxAmount.Label = "Amount";

            filterControl.Controls.Add( numberBoxAmount );

            DateRangePicker dateRangePicker = new DateRangePicker();
            dateRangePicker.ID = filterControl.ID + "_2";
            dateRangePicker.Label = "Date Range";
            dateRangePicker.Required = true;
            filterControl.Controls.Add( dateRangePicker );

            var controls = new Control[3] { comparisonControl, numberBoxAmount, dateRangePicker };

            SetSelection( entityType, controls, string.Format( "{0}|||", ComparisonType.GreaterThanOrEqualTo.ConvertToInt().ToString() ) );

            return controls;
        }
Beispiel #2
0
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            List<Control> controls = new List<Control>();

            var ddlMode = new RockDropDownList();
            controls.Add( ddlMode );
            ddlMode.BindToEnum( typeof( CodeEditorMode ) );
            ddlMode.AutoPostBack = true;
            ddlMode.SelectedIndexChanged += OnQualifierUpdated;
            ddlMode.Label = "Editor Mode";
            ddlMode.Help = "The type of code that will be entered.";

            var ddlTheme = new RockDropDownList();
            controls.Add( ddlTheme );
            ddlTheme.BindToEnum( typeof( CodeEditorTheme ) );
            ddlTheme.AutoPostBack = true;
            ddlTheme.SelectedIndexChanged += OnQualifierUpdated;
            ddlTheme.Label = "Editor Theme";
            ddlTheme.Help = "The styling them to use for the code editor.";

            var nbHeight = new NumberBox();
            controls.Add( nbHeight );
            nbHeight.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer;
            nbHeight.AutoPostBack = true;
            nbHeight.TextChanged += OnQualifierUpdated;
            nbHeight.Label = "Editor Height";
            nbHeight.Help = "The height of the control in pixels.";

            return controls;
        }
Beispiel #3
0
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            List<Control> controls = new List<Control>();

            var nb = new NumberBox();
            controls.Add( nb );
            nb.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer;
            nb.AutoPostBack = true;
            nb.TextChanged += OnQualifierUpdated;
            nb.Label = "Max Rating";
            nb.Help = "The number of stars ( max rating ) that should be displayed.";
            return controls;
        }
Beispiel #4
0
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            var controls = base.ConfigurationControls();

            // Add number box for selecting the number of rows
            var nb = new NumberBox();
            controls.Add( nb );
            nb.AutoPostBack = true;
            nb.TextChanged += OnQualifierUpdated;
            nb.NumberType = ValidationDataType.Integer;
            nb.Label = "Rows";
            nb.Help = "The number of rows to display (default is 3).";

            return controls;
        }
Beispiel #5
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            LocationPicker locationPicker = new LocationPicker();
            locationPicker.ID = filterControl.ID + "_0";
            locationPicker.Label = "Location";

            filterControl.Controls.Add( locationPicker );

            NumberBox numberBox = new NumberBox();
            numberBox.ID = filterControl.ID + "_1";
            numberBox.NumberType = ValidationDataType.Double;
            numberBox.Label = "Miles";
            numberBox.AddCssClass( "number-box-miles" );
            filterControl.Controls.Add( numberBox );

            return new Control[2] { locationPicker, numberBox };
        }
Beispiel #6
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var comparisonControl = ComparisonHelper.ComparisonControl( ComparisonType.LessThan | ComparisonType.GreaterThanOrEqualTo | ComparisonType.EqualTo );
            comparisonControl.ID = filterControl.ID + "_comparisonControl";
            filterControl.Controls.Add( comparisonControl );

            var globalAttributes = Rock.Web.Cache.GlobalAttributesCache.Read();

            NumberBox numberBoxAmount = new NumberBox();
            numberBoxAmount.PrependText = globalAttributes.GetValue( "CurrencySymbol" ) ?? "$";
            numberBoxAmount.NumberType = ValidationDataType.Currency;
            numberBoxAmount.ID = filterControl.ID + "_numberBoxAmount";
            numberBoxAmount.Label = "Amount";

            filterControl.Controls.Add( numberBoxAmount );

            AccountPicker accountPicker = new AccountPicker();
            accountPicker.AllowMultiSelect = true;
            accountPicker.ID = filterControl.ID + "_accountPicker";
            accountPicker.AddCssClass( "js-account-picker" );
            accountPicker.Label = "Accounts";
            filterControl.Controls.Add( accountPicker );

            SlidingDateRangePicker slidingDateRangePicker = new SlidingDateRangePicker();
            slidingDateRangePicker.ID = filterControl.ID + "_slidingDateRangePicker";
            slidingDateRangePicker.AddCssClass( "js-sliding-date-range" );
            slidingDateRangePicker.Label = "Date Range";
            slidingDateRangePicker.Help = "The date range of the transactions using the transaction date of each transaction";
            slidingDateRangePicker.Required = true;
            filterControl.Controls.Add( slidingDateRangePicker );

            RockCheckBox cbCombineGiving = new RockCheckBox();
            cbCombineGiving.ID = filterControl.ID + "_cbCombineGiving";
            cbCombineGiving.Label = "Combine Giving";
            cbCombineGiving.CssClass = "js-combine-giving";
            cbCombineGiving.Help = "Combine individuals in the same giving group when calculating totals and reporting the list of individuals.";
            filterControl.Controls.Add( cbCombineGiving );

            var controls = new Control[5] { comparisonControl, numberBoxAmount, accountPicker, slidingDateRangePicker, cbCombineGiving };

            SetSelection( entityType, controls, string.Format( "{0}||||||", ComparisonType.GreaterThanOrEqualTo.ConvertToInt().ToString() ) );

            return controls;
        }
        /// <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);

            _ddlLastCurrent                       = new DropDownList();
            _ddlLastCurrent.CssClass              = "form-control input-width-md js-slidingdaterange-select slidingdaterange-select";
            _ddlLastCurrent.ID                    = "ddlLastCurrent_" + this.ID;
            _ddlLastCurrent.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _nbNumber            = new NumberBox();
            _nbNumber.CssClass   = "form-control input-width-sm js-number slidingdaterange-number";
            _nbNumber.NumberType = ValidationDataType.Integer;
            _nbNumber.ID         = "nbNumber_" + this.ID;
            _nbNumber.Text       = "1";

            _ddlTimeUnitTypeSingular                       = new DropDownList();
            _ddlTimeUnitTypeSingular.CssClass              = "form-control input-width-md js-time-units-singular slidingdaterange-timeunits-singular";
            _ddlTimeUnitTypeSingular.ID                    = "ddlTimeUnitTypeSingular_" + this.ID;
            _ddlTimeUnitTypeSingular.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _ddlTimeUnitTypePlural                       = new DropDownList();
            _ddlTimeUnitTypePlural.CssClass              = "form-control input-width-md js-time-units-plural slidingdaterange-timeunits-plural";
            _ddlTimeUnitTypePlural.ID                    = "ddlTimeUnitTypePlural_" + this.ID;
            _ddlTimeUnitTypePlural.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _drpDateRange = new DateRangePicker();

            // change the inputsClass on the DateRangePicker to "" instead of "form-control-group";
            _drpDateRange.InputsClass = "";
            _drpDateRange.CssClass    = "js-time-units-date-range slidingdaterange-daterange";
            _drpDateRange.ID          = "drpDateRange_" + this.ID;

            Controls.Add(_ddlLastCurrent);
            Controls.Add(_nbNumber);
            Controls.Add(_ddlTimeUnitTypeSingular);
            Controls.Add(_ddlTimeUnitTypePlural);
            Controls.Add(_drpDateRange);

            PopulateDropDowns();
        }
Beispiel #8
0
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            List<Control> controls = new List<Control>();

            var nbMin = new NumberBox();
            controls.Add( nbMin );
            nbMin.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer;
            nbMin.AutoPostBack = true;
            nbMin.TextChanged += OnQualifierUpdated;
            nbMin.Label = "Min Value";
            nbMin.Help = "The minimum value allowed for the slider range";

            var nbMax = new NumberBox();
            controls.Add( nbMax );
            nbMax.NumberType = System.Web.UI.WebControls.ValidationDataType.Integer;
            nbMax.AutoPostBack = true;
            nbMax.TextChanged += OnQualifierUpdated;
            nbMax.Label = "Max Value";
            nbMax.Help = "The maximum value allowed for the slider range";
            return controls;
        }
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            var controls = base.ConfigurationControls();

            var tbCustomValues = new RockTextBox();
            controls.Add( tbCustomValues );
            tbCustomValues.TextMode = TextBoxMode.MultiLine;
            tbCustomValues.Rows = 3;
            tbCustomValues.AutoPostBack = true;
            tbCustomValues.TextChanged += OnQualifierUpdated;
            tbCustomValues.Label = "Limit Attributes by Field Type";
            tbCustomValues.Help = "Optional list of field type classes for limiting selection to attributes using those field types (e.g. 'Rock.Field.Types.PersonFieldType|Rock.Field.Types.GroupFieldType').";

            var nbRows = new NumberBox();
            controls.Add( nbRows );
            nbRows.AutoPostBack = true;
            nbRows.TextChanged += OnQualifierUpdated;
            nbRows.Label = "Textbox Rows";
            nbRows.Help = "The number of rows to use for textbox.";

            return controls;
        }
Beispiel #10
0
        /// <summary>
        /// Creates the HTML controls required to configure this type of field
        /// </summary>
        /// <returns></returns>
        public override List<Control> ConfigurationControls()
        {
            var controls = base.ConfigurationControls();

            // Add nuber box for selecting the number of rows
            var nb = new NumberBox();
            controls.Add( nb );
            nb.AutoPostBack = true;
            nb.TextChanged += OnQualifierUpdated;
            nb.NumberType = ValidationDataType.Integer;
            nb.Label = "Rows";
            nb.Help = "The number of rows to display (default is 3).";

            // Allow HTML
            var cb = new RockCheckBox();
            controls.Add( cb );
            cb.AutoPostBack = true;
            cb.CheckedChanged += OnQualifierUpdated;
            cb.Label = "Allow HTML";
            cb.Text = "Yes";
            cb.Help = "Controls whether server shold prevent HTML from being entered in this field or not.";

            return controls;
        }
Beispiel #11
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var ddlIntegerCompare = ComparisonHelper.ComparisonControl( ComparisonHelper.NumericFilterComparisonTypes );
            ddlIntegerCompare.Label = "Count";
            ddlIntegerCompare.ID = string.Format( "{0}_ddlIntegerCompare", filterControl.ID );
            ddlIntegerCompare.AddCssClass( "js-filter-compare" );
            filterControl.Controls.Add( ddlIntegerCompare );

            var nbMemberCount = new NumberBox();
            nbMemberCount.Label = "&nbsp;";
            nbMemberCount.ID = string.Format( "{0}_nbMemberCount", filterControl.ID );
            nbMemberCount.AddCssClass( "js-filter-control js-member-count" );
            nbMemberCount.FieldName = "Member Count";
            filterControl.Controls.Add( nbMemberCount );

            RockDropDownList ddlLeader = new RockDropDownList();
            ddlLeader.ID = string.Format( "{0}_ddlMemberType", filterControl.ID );
            ddlLeader.AddCssClass( "js-filter-control js-member-is-leader" );
            ddlLeader.Label = "Member Type";
            ddlLeader.Items.Add( new ListItem( string.Empty, string.Empty ) );
            ddlLeader.Items.Add( new ListItem( "Leader", "true" ) );
            ddlLeader.Items.Add( new ListItem( "Not Leader", "false" ) );
            filterControl.Controls.Add( ddlLeader );
            ddlLeader.Style[HtmlTextWriterStyle.Display] = this.SimpleMemberCountMode ? "none" : string.Empty;

            RockDropDownList ddlMemberStatus = new RockDropDownList();
            ddlMemberStatus.ID = string.Format( "{0}_ddlMemberStatus", filterControl.ID );
            ddlMemberStatus.AddCssClass( "js-filter-control js-member-status" );
            ddlMemberStatus.Label = "Member Status";
            ddlMemberStatus.Items.Add( new ListItem( string.Empty, string.Empty ) );
            foreach ( GroupMemberStatus memberStatus in Enum.GetValues( typeof( GroupMemberStatus ) ) )
            {
                ddlMemberStatus.Items.Add( new ListItem( memberStatus.ConvertToString(), memberStatus.ConvertToInt().ToString() ) );
            }

            filterControl.Controls.Add( ddlMemberStatus );

            ddlLeader.Visible = !this.SimpleMemberCountMode;
            ddlMemberStatus.Visible = !this.SimpleMemberCountMode;

            return new Control[] { ddlIntegerCompare, nbMemberCount, ddlLeader, ddlMemberStatus };
        }
Beispiel #12
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            // Define Control: Person Data View Picker
            var ddlDataView = new DataViewPicker();
            ddlDataView.ID = filterControl.GetChildControlInstanceName( _CtlDataView );
            ddlDataView.Label = "Contains People from this Data View";
            ddlDataView.Help = "A Person Data View that provides the set of possible Group Members.";
            filterControl.Controls.Add( ddlDataView );

            var ddlCompare = ComparisonHelper.ComparisonControl( CountComparisonTypesSpecifier );
            ddlCompare.Label = "where the number of matching Group Members is";
            ddlCompare.ID = filterControl.GetChildControlInstanceName( _CtlComparison );
            ddlCompare.AddCssClass( "js-filter-compare" );
            filterControl.Controls.Add( ddlCompare );

            var nbCount = new NumberBox();
            nbCount.Label = "&nbsp;";
            nbCount.ID = filterControl.GetChildControlInstanceName( _CtlMemberCount );
            nbCount.AddCssClass( "js-filter-control js-member-count" );
            nbCount.FieldName = "Member Count";
            filterControl.Controls.Add( nbCount );

            // Populate the Data View Picker
            ddlDataView.EntityTypeId = EntityTypeCache.Read( typeof(Model.Person) ).Id;

            return new Control[] {ddlDataView, ddlCompare, nbCount};
        }
Beispiel #13
0
        /// <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()
        {
            if (!_controlsLoaded)
            {
                Controls.Clear();

                _tbName          = new RockTextBox();
                _tbName.ID       = this.ID + "_tbName";
                _tbName.Label    = "Registration Instance Name";
                _tbName.Help     = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add(_tbName);

                _cbIsActive       = new RockCheckBox();
                _cbIsActive.ID    = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text  = "Yes";
                Controls.Add(_cbIsActive);

                _tbUrlSlug         = new RockTextBox();
                _tbUrlSlug.ID      = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label   = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add(_tbUrlSlug);


                _ceDetails              = new CodeEditor();
                _ceDetails.ID           = this.ID + "_ceDetails";
                _ceDetails.Label        = "Details";
                _ceDetails.EditorMode   = CodeEditorMode.Html;
                _ceDetails.EditorTheme  = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible      = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add(_ceDetails);


                _dtpStart       = new DateTimePicker();
                _dtpStart.ID    = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add(_dtpStart);

                _dtpEnd       = new DateTimePicker();
                _dtpEnd.ID    = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add(_dtpEnd);

                _nbMaxAttendees            = new NumberBox();
                _nbMaxAttendees.ID         = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label      = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add(_nbMaxAttendees);

                _wtpRegistrationWorkflow       = new WorkflowTypePicker();
                _wtpRegistrationWorkflow.ID    = this.ID + "_wtpRegistrationWorkflow";
                _wtpRegistrationWorkflow.Label = "Registration Workflow";
                _wtpRegistrationWorkflow.Help  = "An optional workflow type to launch when a new registration is completed.";
                Controls.Add(_wtpRegistrationWorkflow);

                _cbCost       = new CurrencyBox();
                _cbCost.ID    = this.ID + "_cbCost";
                _cbCost.Label = "Cost";
                _cbCost.Help  = "The cost per registrant";
                Controls.Add(_cbCost);

                _cbMinimumInitialPayment       = new CurrencyBox();
                _cbMinimumInitialPayment.ID    = this.ID + "_cbMinimumInitialPayment";
                _cbMinimumInitialPayment.Label = "Minimum Initial Payment";
                _cbMinimumInitialPayment.Help  = "The minimum amount required per registrant. Leave value blank if full amount is required.";
                Controls.Add(_cbMinimumInitialPayment);

                _cbDefaultPaymentAmount       = new CurrencyBox();
                _cbDefaultPaymentAmount.ID    = this.ID + "_cbDefaultPaymentAmount";
                _cbDefaultPaymentAmount.Label = "Default Payment Amount";
                _cbDefaultPaymentAmount.Help  = "The default payment amount per registrant. Leave value blank to default to the full amount. NOTE: This requires that a Minimum Initial Payment is defined.";
                Controls.Add(_cbDefaultPaymentAmount);

                _apAccount          = new AccountPicker();
                _apAccount.ID       = this.ID + "_apAccount";
                _apAccount.Label    = "Account";
                _apAccount.Required = true;
                Controls.Add(_apAccount);

                _ppContact                     = new PersonPicker();
                _ppContact.ID                  = this.ID + "_ppContact";
                _ppContact.Label               = "Contact";
                _ppContact.SelectPerson       += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add(_ppContact);

                _pnContactPhone       = new PhoneNumberBox();
                _pnContactPhone.ID    = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add(_pnContactPhone);

                _ebContactEmail       = new EmailBox();
                _ebContactEmail.ID    = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add(_ebContactEmail);

                _dtpSendReminder       = new DateTimePicker();
                _dtpSendReminder.ID    = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add(_dtpSendReminder);

                _cbReminderSent       = new RockCheckBox();
                _cbReminderSent.ID    = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text  = "Yes";
                Controls.Add(_cbReminderSent);

                _htmlRegistrationInstructions         = new HtmlEditor();
                _htmlRegistrationInstructions.ID      = this.ID + "_htmlRegistrationInstructions";
                _htmlRegistrationInstructions.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlRegistrationInstructions.Label   = "Registration Instructions";
                _htmlRegistrationInstructions.Help    = "These instructions will appear at the beginning of the registration process when selecting how many registrants for the registration. These instructions can be provided on the registration template also. Any instructions here will override the instructions on the template.";
                _htmlRegistrationInstructions.Height  = 200;
                Controls.Add(_htmlRegistrationInstructions);

                _htmlAdditionalReminderDetails         = new HtmlEditor();
                _htmlAdditionalReminderDetails.ID      = this.ID + "_htmlAdditionalReminderDetails";
                _htmlAdditionalReminderDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalReminderDetails.Label   = "Additional Reminder Details";
                _htmlAdditionalReminderDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalReminderDetails.Height  = 200;
                Controls.Add(_htmlAdditionalReminderDetails);

                _htmlAdditionalConfirmationDetails         = new HtmlEditor();
                _htmlAdditionalConfirmationDetails.ID      = this.ID + "_htmlAdditionalConfirmationDetails";
                _htmlAdditionalConfirmationDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalConfirmationDetails.Label   = "Additional Confirmation Details";
                _htmlAdditionalConfirmationDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalConfirmationDetails.Height  = 200;
                Controls.Add(_htmlAdditionalConfirmationDetails);

                _controlsLoaded = true;
            }
        }
Beispiel #14
0
        /// <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 );

            _tbLowerValue = new NumberBox();
            _tbLowerValue.ID = this.ID + "_lower";
            _tbLowerValue.CssClass = "input-width-md";
            Controls.Add( _tbLowerValue );

            _tbUpperValue = new NumberBox();
            _tbUpperValue.ID = this.ID + "_upper";
            _tbUpperValue.CssClass = "input-width-md";
            Controls.Add( _tbUpperValue );
        }
        /// <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()
        {
            if (!_controlsLoaded)
            {
                Controls.Clear();

                _tbName          = new RockTextBox();
                _tbName.ID       = this.ID + "_tbName";
                _tbName.Label    = "Registration Instance Name";
                _tbName.Help     = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add(_tbName);

                _cbIsActive       = new RockCheckBox();
                _cbIsActive.ID    = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text  = "Yes";
                Controls.Add(_cbIsActive);

                _tbUrlSlug         = new RockTextBox();
                _tbUrlSlug.ID      = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label   = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add(_tbUrlSlug);


                _ceDetails              = new CodeEditor();
                _ceDetails.ID           = this.ID + "_ceDetails";
                _ceDetails.Label        = "Details";
                _ceDetails.EditorMode   = CodeEditorMode.Html;
                _ceDetails.EditorTheme  = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible      = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add(_ceDetails);


                _dtpStart       = new DateTimePicker();
                _dtpStart.ID    = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add(_dtpStart);

                _dtpEnd       = new DateTimePicker();
                _dtpEnd.ID    = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add(_dtpEnd);

                _nbMaxAttendees            = new NumberBox();
                _nbMaxAttendees.ID         = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label      = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add(_nbMaxAttendees);

                _apAccount          = new AccountPicker();
                _apAccount.ID       = this.ID + "_apAccount";
                _apAccount.Label    = "Account";
                _apAccount.Required = true;
                Controls.Add(_apAccount);

                _ppContact                     = new PersonPicker();
                _ppContact.ID                  = this.ID + "_ppContact";
                _ppContact.Label               = "Contact";
                _ppContact.SelectPerson       += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add(_ppContact);

                _pnContactPhone       = new PhoneNumberBox();
                _pnContactPhone.ID    = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add(_pnContactPhone);

                _ebContactEmail       = new EmailBox();
                _ebContactEmail.ID    = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add(_ebContactEmail);

                _dtpSendReminder       = new DateTimePicker();
                _dtpSendReminder.ID    = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add(_dtpSendReminder);

                _cbReminderSent       = new RockCheckBox();
                _cbReminderSent.ID    = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text  = "Yes";
                Controls.Add(_cbReminderSent);

                _htmlAdditionalReminderDetails         = new HtmlEditor();
                _htmlAdditionalReminderDetails.ID      = this.ID + "_htmlAdditionalReminderDetails";
                _htmlAdditionalReminderDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalReminderDetails.Label   = "Additional Reminder Details";
                _htmlAdditionalReminderDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalReminderDetails.Height  = 200;
                Controls.Add(_htmlAdditionalReminderDetails);

                _htmlAdditionalConfirmationDetails         = new HtmlEditor();
                _htmlAdditionalConfirmationDetails.ID      = this.ID + "_htmlAdditionalConfirmationDetails";
                _htmlAdditionalConfirmationDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalConfirmationDetails.Label   = "Additional Confirmation Details";
                _htmlAdditionalConfirmationDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalConfirmationDetails.Height  = 200;
                Controls.Add(_htmlAdditionalConfirmationDetails);

                _controlsLoaded = true;
            }
        }
Beispiel #16
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            RockDropDownList groupLocationTypeList = new RockDropDownList();
            groupLocationTypeList.Items.Clear();
            foreach ( var value in Rock.Web.Cache.DefinedTypeCache.Read( Rock.SystemGuid.DefinedType.GROUP_LOCATION_TYPE.AsGuid() ).DefinedValues.OrderBy( a => a.Order ).ThenBy( a => a.Value ) )
            {
                groupLocationTypeList.Items.Add( new ListItem( value.Value, value.Guid.ToString() ) );
            }

            groupLocationTypeList.Items.Insert( 0, Rock.Constants.None.ListItem );

            groupLocationTypeList.ID = filterControl.ID + "_groupLocationTypeList";
            groupLocationTypeList.Label = "Location Type";
            filterControl.Controls.Add( groupLocationTypeList );

            LocationPicker locationPicker = new LocationPicker();
            locationPicker.ID = filterControl.ID + "_locationPicker";
            locationPicker.Label = "Location";

            filterControl.Controls.Add( locationPicker );

            NumberBox numberBox = new NumberBox();
            numberBox.ID = filterControl.ID + "_numberBox";
            numberBox.NumberType = ValidationDataType.Double;
            numberBox.Label = "Miles";
            numberBox.AddCssClass( "number-box-miles" );
            filterControl.Controls.Add( numberBox );

            return new Control[3] { groupLocationTypeList, locationPicker, numberBox };
        }
Beispiel #17
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var controls = new List<Control>();

            // Create the field selection dropdown
            var ddlProperty = new RockDropDownList();
            ddlProperty.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
            filterControl.Controls.Add( ddlProperty );
            controls.Add( ddlProperty );

            foreach ( var entityField in GetEntityFields(entityType) )
            {
                // Add the field to the dropdown of availailable fields
                ddlProperty.Items.Add( new ListItem( entityField.Title, entityField.Name ) );

                switch ( entityField.FilterFieldType )
                {
                    case SystemGuid.FieldType.DATE:

                        var ddlDate = ComparisonControl( DateFilterComparisonTypes );
                        ddlDate.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( ddlDate );
                        controls.Add( ddlDate );

                        var dtPicker = new DatePicker();
                        dtPicker.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( dtPicker );
                        controls.Add( dtPicker );

                        break;

                    case SystemGuid.FieldType.INTEGER:

                        var ddlInteger = ComparisonControl( NumericFilterComparisonTypes );
                        ddlInteger.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( ddlInteger );
                        controls.Add( ddlInteger );

                        var numberBox = new NumberBox();
                        numberBox.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( numberBox );
                        controls.Add( numberBox );

                        numberBox.FieldName = entityField.Title;

                        break;

                    case SystemGuid.FieldType.MULTI_SELECT:

                        var cblMultiSelect = new RockCheckBoxList();
                        cblMultiSelect.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( cblMultiSelect );
                        cblMultiSelect.RepeatDirection = RepeatDirection.Horizontal;
                        controls.Add( cblMultiSelect );

                        if ( entityField.FieldKind == FieldKind.Property )
                        {
                            // Enumeration property
                            if ( entityField.PropertyType.IsEnum )
                            {
                                foreach ( var value in Enum.GetValues( entityField.PropertyType ) )
                                {
                                    cblMultiSelect.Items.Add( new ListItem( Enum.GetName( entityField.PropertyType, value ).SplitCase() ) );
                                }
                            }

                            // Defined Value Properties
                            else if ( entityField.DefinedTypeId.HasValue )
                            {
                                var definedType = DefinedTypeCache.Read( entityField.DefinedTypeId.Value );
                                if ( definedType != null )
                                {
                                    foreach ( var definedValue in definedType.DefinedValues )
                                        cblMultiSelect.Items.Add( new ListItem( definedValue.Name, definedValue.Id.ToString() ) );
                                }
                            }
                        }
                        else
                        {
                            var attribute = AttributeCache.Read( entityField.AttributeId.Value );
                            if (attribute != null)
                            {
                                switch ( attribute.FieldType.Guid.ToString().ToUpper() )
                                {
                                    case SystemGuid.FieldType.SINGLE_SELECT:
                                        //TODO get attribute values qualifier to populate cbl
                                        break;
                                    case SystemGuid.FieldType.MULTI_SELECT:
                                        //TODO get attribute values qualifier to populate cbl
                                        break;
                                }
                            }
                        }

                        break;

                    case SystemGuid.FieldType.SINGLE_SELECT:

                        var ddlSingleSelect = new RockDropDownList();
                        ddlSingleSelect.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( ddlSingleSelect );
                        controls.Add( ddlSingleSelect );

                        if ( entityField.FieldKind == FieldKind.Property )
                        {
                            if ( entityField.PropertyType == typeof( bool ) || entityField.PropertyType == typeof( bool? ) )
                            {
                                ddlSingleSelect.Items.Add( new ListItem( "True", "True" ) );
                                ddlSingleSelect.Items.Add( new ListItem( "False", "False" ) );
                            }
                        }
                        else
                        {
                            var attribute = AttributeCache.Read( entityField.AttributeId.Value );
                            if ( attribute != null )
                            {
                                switch ( attribute.FieldType.Guid.ToString().ToUpper() )
                                {
                                    case SystemGuid.FieldType.BOOLEAN:
                                        ddlSingleSelect.Items.Add( new ListItem( "True", "True" ) );
                                        ddlSingleSelect.Items.Add( new ListItem( "False", "False" ) );
                                        break;
                                }
                            }
                        }

                        break;

                    case SystemGuid.FieldType.TEXT:

                        var ddl = ComparisonControl( StringFilterComparisonTypes );
                        ddl.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( ddl );
                        controls.Add( ddl );

                        var tb = new RockTextBox();
                        tb.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
                        filterControl.Controls.Add( tb );
                        controls.Add( tb );

                        break;

                }
            }

            _clientFormatSelection = string.Format( "{0}PropertySelection( $content )", entityType.Name );
            
            return controls.ToArray();        
        }
Beispiel #18
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="parentControl"></param>
        /// <returns></returns>
        public override System.Web.UI.Control[] CreateChildControls( System.Web.UI.Control parentControl )
        {
            NumberBox widthBox = new NumberBox();
            widthBox.NumberType = ValidationDataType.Integer;
            widthBox.MaxLength = 3;
            widthBox.MinimumValue = "0";
            widthBox.Label = "Image Width";
            widthBox.ID = parentControl.ID + "_widthBox";
            parentControl.Controls.Add( widthBox );

            NumberBox heightBox = new NumberBox();
            heightBox.NumberType = ValidationDataType.Integer;
            heightBox.MaxLength = 3;
            heightBox.MinimumValue = "0";
            heightBox.Label = "Image Height";
            heightBox.ID = parentControl.ID + "_heightBox";
            parentControl.Controls.Add( heightBox );

            return new System.Web.UI.Control[] { widthBox, heightBox };
        }
Beispiel #19
0
        /// <summary>
        /// Adds the field type controls.
        /// </summary>
        /// <param name="parentControl">The filter control.</param>
        /// <param name="controls">The controls.</param>
        /// <param name="entityField">The entity field.</param>
        protected void AddFieldTypeControls( Control parentControl, List<Control> controls, EntityField entityField )
        {
            string controlIdPrefix = string.Format( "{0}_{1}", parentControl.ID, entityField.FieldKind == FieldKind.Attribute ? entityField.AttributeGuid.Value.ToString("n") : entityField.Name );
            switch ( entityField.FilterFieldType )
            {
                case SystemGuid.FieldType.DATE:

                    var ddlDateCompare = ComparisonControl( DateFilterComparisonTypes );
                    ddlDateCompare.ID = string.Format( "{0}_ddlDateCompare", controlIdPrefix );
                    ddlDateCompare.AddCssClass( "js-filter-compare" );
                    parentControl.Controls.Add( ddlDateCompare );
                    controls.Add( ddlDateCompare );

                    var datePicker = new DatePicker();
                    datePicker.ID = string.Format( "{0}_dtPicker", controlIdPrefix );
                    datePicker.AddCssClass( "js-filter-control" );
                    parentControl.Controls.Add( datePicker );
                    controls.Add( datePicker );

                    break;

                case SystemGuid.FieldType.TIME:

                    var ddlTimeCompare = ComparisonControl( DateFilterComparisonTypes );
                    ddlTimeCompare.ID = string.Format( "{0}_ddlTimeCompare", controlIdPrefix );
                    ddlTimeCompare.AddCssClass( "js-filter-compare" );
                    parentControl.Controls.Add( ddlTimeCompare );
                    controls.Add( ddlTimeCompare );

                    var timePicker = new TimePicker();
                    timePicker.ID = string.Format( "{0}_timePicker", controlIdPrefix );
                    timePicker.AddCssClass( "js-filter-control" );
                    parentControl.Controls.Add( timePicker );
                    controls.Add( timePicker );

                    break;

                case SystemGuid.FieldType.INTEGER:
                case SystemGuid.FieldType.DECIMAL:

                    var ddlNumberCompare = ComparisonControl( NumericFilterComparisonTypes );
                    ddlNumberCompare.ID = string.Format( "{0}_ddlNumberCompare", controlIdPrefix );
                    ddlNumberCompare.AddCssClass( "js-filter-compare" );
                    parentControl.Controls.Add( ddlNumberCompare );
                    controls.Add( ddlNumberCompare );

                    var numberBox = new NumberBox();
                    numberBox.ID = string.Format( "{0}_numberBox", controlIdPrefix );
                    numberBox.AddCssClass( "js-filter-control" );
                    parentControl.Controls.Add( numberBox );
                    controls.Add( numberBox );

                    numberBox.FieldName = entityField.Title;

                    break;

                case SystemGuid.FieldType.MULTI_SELECT:

                    var cblMultiSelect = new RockCheckBoxList();
                    cblMultiSelect.ID = string.Format( "{0}_cblMultiSelect", controlIdPrefix );
                    parentControl.Controls.Add( cblMultiSelect );
                    cblMultiSelect.RepeatDirection = RepeatDirection.Horizontal;
                    controls.Add( cblMultiSelect );

                    if ( entityField.FieldKind == FieldKind.Property )
                    {
                        if ( entityField.PropertyType.IsEnum )
                        {
                            // Enumeration property
                            foreach ( var value in Enum.GetValues( entityField.PropertyType ) )
                            {
                                cblMultiSelect.Items.Add( new ListItem( Enum.GetName( entityField.PropertyType, value ).SplitCase() ) );
                            }
                        }
                        else if ( entityField.DefinedTypeGuid.HasValue )
                        {
                            // Defined Value Properties
                            var definedType = DefinedTypeCache.Read( entityField.DefinedTypeGuid.Value );
                            if ( definedType != null )
                            {
                                foreach ( var definedValue in definedType.DefinedValues )
                                {
                                    cblMultiSelect.Items.Add( new ListItem( definedValue.Name, definedValue.Guid.ToString() ) );
                                }
                            }
                        }
                    }
                    else
                    {
                        var attribute = AttributeCache.Read( entityField.AttributeGuid.Value );
                        if ( attribute != null )
                        {
                            switch ( attribute.FieldType.Guid.ToString().ToUpper() )
                            {
                                case SystemGuid.FieldType.SINGLE_SELECT:
                                    //TODO get attribute values qualifier to populate cbl
                                    break;
                                case SystemGuid.FieldType.MULTI_SELECT:
                                    //TODO get attribute values qualifier to populate cbl
                                    break;
                            }
                        }
                    }

                    break;

                case SystemGuid.FieldType.SINGLE_SELECT:

                    var ddlSingleSelect = new RockDropDownList();
                    ddlSingleSelect.ID = string.Format( "{0}_ddlSingleSelect", controlIdPrefix );
                    parentControl.Controls.Add( ddlSingleSelect );
                    controls.Add( ddlSingleSelect );

                    if ( entityField.FieldKind == FieldKind.Property )
                    {
                        if ( entityField.PropertyType == typeof( bool ) || entityField.PropertyType == typeof( bool? ) )
                        {
                            ddlSingleSelect.Items.Add( new ListItem( "True", "True" ) );
                            ddlSingleSelect.Items.Add( new ListItem( "False", "False" ) );
                        }
                    }
                    else
                    {
                        var attribute = AttributeCache.Read( entityField.AttributeGuid.Value );
                        if ( attribute != null )
                        {
                            switch ( attribute.FieldType.Guid.ToString().ToUpper() )
                            {
                                case SystemGuid.FieldType.BOOLEAN:
                                    ddlSingleSelect.Items.Add( new ListItem( "True", "True" ) );
                                    ddlSingleSelect.Items.Add( new ListItem( "False", "False" ) );
                                    break;
                            }
                        }
                    }

                    break;

                case SystemGuid.FieldType.DAY_OF_WEEK:
                    var dayOfWeekPicker = new DayOfWeekPicker();
                    dayOfWeekPicker.Label = string.Empty;
                    dayOfWeekPicker.ID = string.Format( "{0}_dayOfWeekPicker", controlIdPrefix );
                    dayOfWeekPicker.AddCssClass( "js-filter-control" );
                    parentControl.Controls.Add( dayOfWeekPicker );
                    controls.Add( dayOfWeekPicker );

                    break;

                case SystemGuid.FieldType.TEXT:

                    var ddlText = ComparisonControl( StringFilterComparisonTypes );
                    ddlText.ID = string.Format( "{0}_ddlText", controlIdPrefix );
                    ddlText.AddCssClass( "js-filter-compare" );
                    parentControl.Controls.Add( ddlText );
                    controls.Add( ddlText );

                    var tbText = new RockTextBox();
                    tbText.ID = string.Format( "{0}_tbText", controlIdPrefix );
                    tbText.AddCssClass( "js-filter-control" );
                    parentControl.Controls.Add( tbText );
                    controls.Add( tbText );

                    break;
            }
        }
Beispiel #20
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var controls = new List<Control>();

            var ddlIntegerCompare = ComparisonHelper.ComparisonControl( ComparisonHelper.NumericFilterComparisonTypes | ComparisonType.Between );
            ddlIntegerCompare.ID = string.Format( "{0}_{1}", filterControl.ID, "ddlIntegerCompare" );
            ddlIntegerCompare.AddCssClass( "js-filter-compare" );
            filterControl.Controls.Add( ddlIntegerCompare );
            controls.Add( ddlIntegerCompare );

            var numberBox = new NumberBox();
            numberBox.ID = string.Format( "{0}_{1}", filterControl.ID, "numberBox" );
            numberBox.AddCssClass( "js-filter-control" );
            filterControl.Controls.Add( numberBox );
            controls.Add( numberBox );

            numberBox.FieldName = "Age";

            var numberRangeEditor = new Rock.Web.UI.Controls.NumberRangeEditor();
            numberRangeEditor.ID = string.Format( "{0}_{1}", filterControl.ID, "numberRangeEditor" );
            numberRangeEditor.RangeLabel = "and";
            numberRangeEditor.AddCssClass( "js-filter-control-between" );
            filterControl.Controls.Add( numberRangeEditor );
            controls.Add( numberRangeEditor );

            return controls.ToArray();
        }
Beispiel #21
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            var controls = new List<Control>();

            var ddlIntegerCompare = ComparisonHelper.ComparisonControl( ComparisonHelper.NumericFilterComparisonTypes );
            ddlIntegerCompare.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
            ddlIntegerCompare.AddCssClass( "js-filter-compare" );
            filterControl.Controls.Add( ddlIntegerCompare );
            controls.Add( ddlIntegerCompare );

            var numberBox = new NumberBox();
            numberBox.ID = string.Format( "{0}_{1}", filterControl.ID, controls.Count() );
            numberBox.AddCssClass( "js-filter-control" );
            filterControl.Controls.Add( numberBox );
            controls.Add( numberBox );

            numberBox.FieldName = "Age";

            return controls.ToArray();
        }
Beispiel #22
0
 /// <summary>
 /// Creates the control(s) neccessary for prompting user for a new value
 /// </summary>
 /// <param name="configurationValues">The configuration values.</param>
 /// <param name="id"></param>
 /// <returns>
 /// The control
 /// </returns>
 public override System.Web.UI.Control EditControl( System.Collections.Generic.Dictionary<string, ConfigurationValue> configurationValues, string id )
 {
     var numberBox = new NumberBox { ID = id }; 
     numberBox.NumberType = System.Web.UI.WebControls.ValidationDataType.Double;
     return numberBox;
 }
Beispiel #23
0
        /// <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()
        {
            if ( !_controlsLoaded )
            {
                Controls.Clear();

                _tbName = new RockTextBox();
                _tbName.ID = this.ID + "_tbName";
                _tbName.Label = "Registration Instance Name";
                _tbName.Help = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add( _tbName );

                _cbIsActive = new RockCheckBox();
                _cbIsActive.ID = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text = "Yes";
                Controls.Add( _cbIsActive );

                _tbUrlSlug = new RockTextBox();
                _tbUrlSlug.ID = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add( _tbUrlSlug );

                _ceDetails = new CodeEditor();
                _ceDetails.ID = this.ID + "_ceDetails";
                _ceDetails.Label = "Details";
                _ceDetails.EditorMode = CodeEditorMode.Html;
                _ceDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add( _ceDetails );

                _dtpStart = new DateTimePicker();
                _dtpStart.ID = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add( _dtpStart );

                _dtpEnd = new DateTimePicker();
                _dtpEnd.ID = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add( _dtpEnd );

                _nbMaxAttendees = new NumberBox();
                _nbMaxAttendees.ID = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add( _nbMaxAttendees );

                _apAccount = new AccountPicker();
                _apAccount.ID = this.ID + "_apAccount";
                _apAccount.Label = "Account";
                _apAccount.Required = true;
                Controls.Add( _apAccount );

                _ppContact = new PersonPicker();
                _ppContact.ID = this.ID + "_ppContact";
                _ppContact.Label = "Contact";
                _ppContact.SelectPerson += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add( _ppContact );

                _pnContactPhone = new PhoneNumberBox();
                _pnContactPhone.ID = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add( _pnContactPhone );

                _ebContactEmail = new EmailBox();
                _ebContactEmail.ID = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add( _ebContactEmail );

                _dtpSendReminder = new DateTimePicker();
                _dtpSendReminder.ID = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add( _dtpSendReminder );

                _cbReminderSent = new RockCheckBox();
                _cbReminderSent.ID = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text = "Yes";
                Controls.Add( _cbReminderSent );

                _ceAdditionalReminderDetails = new CodeEditor();
                _ceAdditionalReminderDetails.ID = this.ID + "_ceAdditionalReminderDetails";
                _ceAdditionalReminderDetails.Label = "Additional Reminder Details";
                _ceAdditionalReminderDetails.Help = "These reminder details will be appended to those in the registration template when sending the reminder email.";
                _ceAdditionalReminderDetails.EditorMode = CodeEditorMode.Html;
                _ceAdditionalReminderDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceAdditionalReminderDetails.EditorHeight = "100";
                Controls.Add( _ceAdditionalReminderDetails );

                _ceAdditionalConfirmationDetails = new CodeEditor();
                _ceAdditionalConfirmationDetails.ID = this.ID + "_ceAdditionalConfirmationDetails";
                _ceAdditionalConfirmationDetails.Label = "Additional Confirmation Details";
                _ceAdditionalConfirmationDetails.Help = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _ceAdditionalConfirmationDetails.EditorMode = CodeEditorMode.Html;
                _ceAdditionalConfirmationDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceAdditionalConfirmationDetails.EditorHeight = "100";
                Controls.Add( _ceAdditionalConfirmationDetails );

                _controlsLoaded = true;
            }
        }
Beispiel #24
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ScheduleBuilder"/> class.
        /// </summary>
        public ScheduleBuilderPopupContents()
        {
            // common
            _dpStartDateTime = new DateTimePicker();

            _tbDurationHours = new NumberBox();
            _tbDurationMinutes = new NumberBox();

            _radOneTime = new RadioButton();
            _radRecurring = new RadioButton();

            _radSpecificDates = new RadioButton();
            _radDaily = new RadioButton();
            _radWeekly = new RadioButton();
            _radMonthly = new RadioButton();

            // specific date
            _hfSpecificDateListValues = new HiddenField();

            _dpSpecificDate = new DatePicker();

            // daily
            _radDailyEveryXDays = new RadioButton();
            _tbDailyEveryXDays = new NumberBox();
            _radDailyEveryWeekday = new RadioButton();
            _radDailyEveryWeekendDay = new RadioButton();

            // weekly
            _tbWeeklyEveryX = new NumberBox();
            _cbWeeklySunday = new RockCheckBox();
            _cbWeeklyMonday = new RockCheckBox();
            _cbWeeklyTuesday = new RockCheckBox();
            _cbWeeklyWednesday = new RockCheckBox();
            _cbWeeklyThursday = new RockCheckBox();
            _cbWeeklyFriday = new RockCheckBox();
            _cbWeeklySaturday = new RockCheckBox();

            // monthly
            _radMonthlyDayX = new RadioButton();
            _tbMonthlyDayX = new NumberBox();
            _tbMonthlyXMonths = new NumberBox();
            _radMonthlyNth = new RadioButton();
            _ddlMonthlyNth = new RockDropDownList();
            _ddlMonthlyDayName = new RockDropDownList();

            // end date
            _radEndByNone = new RadioButton();
            _radEndByDate = new RadioButton();
            _dpEndBy = new DatePicker();
            _radEndByOccurrenceCount = new RadioButton();
            _tbEndByOccurrenceCount = new NumberBox();

            // exclusions
            _hfExclusionDateRangeListValues = new HiddenField();
            _dpExclusionDateRange = new DateRangePicker();
        }
Beispiel #25
0
        /// <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 );

            _ddlLastCurrent = new DropDownList();
            _ddlLastCurrent.CssClass = "form-control input-width-md js-slidingdaterange-select slidingdaterange-select";
            _ddlLastCurrent.ID = "ddlLastCurrent_" + this.ID;
            _ddlLastCurrent.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _nbNumber = new NumberBox();
            _nbNumber.CssClass = "form-control input-width-sm js-number slidingdaterange-number";
            _nbNumber.NumberType = ValidationDataType.Integer;
            _nbNumber.ID = "nbNumber_" + this.ID;
            _nbNumber.Text = "1";

            _ddlTimeUnitTypeSingular = new DropDownList();
            _ddlTimeUnitTypeSingular.CssClass = "form-control input-width-md js-time-units-singular slidingdaterange-timeunits-singular";
            _ddlTimeUnitTypeSingular.ID = "ddlTimeUnitTypeSingular_" + this.ID;
            _ddlTimeUnitTypeSingular.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _ddlTimeUnitTypePlural = new DropDownList();
            _ddlTimeUnitTypePlural.CssClass = "form-control input-width-md js-time-units-plural slidingdaterange-timeunits-plural";
            _ddlTimeUnitTypePlural.ID = "ddlTimeUnitTypePlural_" + this.ID;
            _ddlTimeUnitTypePlural.SelectedIndexChanged += ddl_SelectedIndexChanged;

            _drpDateRange = new DateRangePicker();

            // change the inputsClass on the DateRangePicker to "" instead of "form-control-group";
            _drpDateRange.InputsClass = "";
            _drpDateRange.CssClass = "js-time-units-date-range slidingdaterange-daterange";
            _drpDateRange.ID = "drpDateRange_" + this.ID;

            Controls.Add( _ddlLastCurrent );
            Controls.Add( _nbNumber );
            Controls.Add( _ddlTimeUnitTypeSingular );
            Controls.Add( _ddlTimeUnitTypePlural );
            Controls.Add( _drpDateRange );

            PopulateDropDowns();
        }