Inheritance: ItemPicker
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            AccountPicker accountPicker = new AccountPicker();
            accountPicker.AllowMultiSelect = true;
            accountPicker.ID = filterControl.ID + "_accountPicker";
            accountPicker.AddCssClass( "js-account-picker" );
            accountPicker.Label = "Accounts";
            filterControl.Controls.Add( accountPicker );

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

            var controls = new Control[2] { accountPicker, dateRangePicker };

            return controls;
        }
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            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 'Sunday Date' of each transaction";
            slidingDateRangePicker.Required = true;
            filterControl.Controls.Add( slidingDateRangePicker );

            var controls = new Control[2] { accountPicker, slidingDateRangePicker };

            return controls;
        }
示例#3
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;
            }
        }
        /// <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;
            }
        }
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( System.Web.UI.Control parentControl )
        {
            var comparisonControl = ComparisonHelper.ComparisonControl( ComparisonType.LessThan | ComparisonType.GreaterThanOrEqualTo | ComparisonType.EqualTo );
            comparisonControl.ID = parentControl.ID + "_0";
            parentControl.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 = parentControl.ID + "_1";
            numberBoxAmount.Label = "Amount";

            parentControl.Controls.Add( numberBoxAmount );

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

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

            RockCheckBox cbCombineGiving = new RockCheckBox();
            cbCombineGiving.ID = parentControl.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.";
            parentControl.Controls.Add( cbCombineGiving );

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

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

            return controls;
        }
示例#6
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;
            }
        }
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="parentControl"></param>
        /// <returns></returns>
        public override System.Web.UI.Control[] CreateChildControls( System.Web.UI.Control parentControl )
        {
            AccountPicker accountPicker = new AccountPicker();
            accountPicker.AllowMultiSelect = true;
            accountPicker.ID = parentControl.ID + "_accountPicker";
            accountPicker.Label = "Account";
            accountPicker.Help = string.Format(
                "Pick accounts to show the {0} time the person made a contribution into any of those accounts. Leave blank if you don't want to limit it to specific accounts.",
                FirstOrLast.ConvertToString().ToLower() );
            parentControl.Controls.Add( accountPicker );

            return new System.Web.UI.Control[] { accountPicker };
        }