Inheritance: System.Web.UI.WebControls.CompositeControl, IRockControl
示例#1
0
 /// <summary>
 /// Creates the control(s) necessary 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 Control EditControl( Dictionary<string, ConfigurationValue> configurationValues, string id )
 {
     var dateTimePicker = new DateTimePicker { ID = id };
     dateTimePicker.DisplayCurrentOption = configurationValues != null &&
         configurationValues.ContainsKey( "displayCurrentOption" ) &&
         configurationValues["displayCurrentOption"].Value.AsBoolean();
     return dateTimePicker;
 }
示例#2
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();
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NoteControl"/> class.
 /// </summary>
 public NoteControl()
 {
     _ddlNoteType = new DropDownList();
     _tbNote = new RockTextBox();
     _tbNote.Placeholder = "Write a note...";
     _cbAlert = new CheckBox();
     _cbPrivate = new CheckBox();
     _lbSaveNote = new LinkButton();
     _lbEditNote = new LinkButton();
     _lbDeleteNote = new LinkButton();
     _sbSecurity = new SecurityButton();
     _dtCreateDate = new DateTimePicker();
 }
示例#4
0
        /// <summary>
        /// Gets the filter value control.
        /// </summary>
        /// <param name="configurationValues">The configuration values.</param>
        /// <param name="id">The identifier.</param>
        /// <param name="required">if set to <c>true</c> [required].</param>
        /// <param name="filterMode">The filter mode.</param>
        /// <returns></returns>
        public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required, FilterMode filterMode )
        {
            var dateFiltersPanel = new Panel();
            dateFiltersPanel.ID = string.Format( "{0}_dtFilterControls", id );

            var datePickerPanel = new Panel();
            dateFiltersPanel.Controls.Add( datePickerPanel );

            var datePicker = new DateTimePicker();
            datePicker.ID = string.Format( "{0}_dtPicker", id );
            datePicker.DisplayCurrentOption = true;
            datePickerPanel.AddCssClass( "js-filter-control" );
            datePickerPanel.Controls.Add( datePicker );

            var slidingDateRangePicker = new SlidingDateRangePicker();
            slidingDateRangePicker.ID = string.Format( "{0}_dtSlidingDateRange", id );
            slidingDateRangePicker.AddCssClass( "js-filter-control-between" );
            slidingDateRangePicker.Label = string.Empty;
            slidingDateRangePicker.PreviewLocation = SlidingDateRangePicker.DateRangePreviewLocation.Right;
            dateFiltersPanel.Controls.Add( slidingDateRangePicker );

            return dateFiltersPanel;
        }
示例#5
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>
 /// Gets the filter value control.
 /// </summary>
 /// <param name="configurationValues">The configuration values.</param>
 /// <param name="id">The identifier.</param>
 /// <param name="required">if set to <c>true</c> [required].</param>
 /// <returns></returns>
 public override Control FilterValueControl( Dictionary<string, ConfigurationValue> configurationValues, string id, bool required )
 {
     var dtPicker = new DateTimePicker();
     dtPicker.ID = string.Format( "{0}_dtPicker", id );
     dtPicker.AddCssClass( "js-filter-control" );
     dtPicker.DisplayCurrentOption = true;
     return dtPicker;
 }
        /// <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.Help       = "Total number of people who can register for the event. Leave blank for unlimited.";
                _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 greater than 0.";
                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 reminder details will be included in the reminder notification.";
                _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;
            }
        }