Inheritance: RockDropDownList
Exemplo n.º 1
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl )
        {
            WorkflowTypePicker workflowTypePicker = new WorkflowTypePicker();
            workflowTypePicker.ID = filterControl.ID + "_workflowTypePicker";
            workflowTypePicker.CssClass = "js-workflow-type-picker";
            workflowTypePicker.Label = "Workflow Type";
            filterControl.Controls.Add( workflowTypePicker );

            return new Control[] { workflowTypePicker };
        }
Exemplo n.º 2
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;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates the child controls.
        /// Implement this version of CreateChildControls if your DataFilterComponent supports different FilterModes
        /// </summary>
        /// <param name="entityType"></param>
        /// <param name="filterControl"></param>
        /// <param name="filterMode"></param>
        /// <returns></returns>
        public override Control[] CreateChildControls( Type entityType, FilterField filterControl, FilterMode filterMode )
        {
            var containerControl = new DynamicControlsPanel();
            containerControl.ID = string.Format( "{0}_containerControl", filterControl.ID );
            containerControl.CssClass = "js-container-control";
            filterControl.Controls.Add( containerControl );

            WorkflowTypePicker workflowTypePicker = new WorkflowTypePicker();
            workflowTypePicker.ID = filterControl.ID + "_workflowTypePicker";
            workflowTypePicker.Label = "Workflow Type";
            workflowTypePicker.SelectItem += workflowTypePicker_SelectItem;
            workflowTypePicker.Visible = filterMode == FilterMode.AdvancedFilter;
            containerControl.Controls.Add( workflowTypePicker );

            // set the WorkflowTypePicker selected value now so we can create the other controls the depending on know the workflowTypeid
            var hfItem = workflowTypePicker.ControlsOfTypeRecursive<HiddenFieldWithClass>().Where( a => a.CssClass.Contains( "js-item-id-value" ) ).FirstOrDefault();
            int? workflowTypeId = filterControl.Page.Request.Params[hfItem.UniqueID].AsIntegerOrNull();
            workflowTypePicker.SetValue( workflowTypeId );
            workflowTypePicker_SelectItem( workflowTypePicker, new EventArgs() );

            return new Control[] { containerControl };
        }
Exemplo n.º 4
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 );

                _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;
            }
        }