Beispiel #1
0
        /// <summary>
        /// Load in all the Javascript references we need on this page.
        /// </summary>
        /// <param name="e">Unused parameter.</param>
        protected override void OnLoad(EventArgs e)
        {
//            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
            BasePage.AddJavascriptInclude(Page, "http://maps.google.com/maps/api/js?sensor=false");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/GoogleMaps/Includes/googlemaps.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/GoogleMaps/Includes/json2.js");
        }
Beispiel #2
0
 protected void Page_Init(object sender, EventArgs e)
 {
     dgAttendance.ReBind += new Arena.Portal.UI.DataGridReBindEventHandler(dgAttendance_ReBind);
     BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
     BasePage.AddJavascriptInclude(Page, "include/scripts/jquery.hoverIntent.min.js");
     BasePage.AddJavascriptInclude(Page, AppRelativeTemplateSourceDirectory.Remove(0, 2) + "Scripts/hdcHoverPopup.js");
 }
 protected override void OnLoad(EventArgs e)
 {
     BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
     BasePage.AddJavascriptInclude(Page, "Custom/RC/Utilities/FileUploader/jquery.uploadify.min.js");
     BasePage.AddJavascriptInclude(Page, "Custom/RC/Utilities/FileUploader/swfobject.js");
     BasePage.AddCssLink(Page, "Custom/RC/Utilities/FileUploader/uploadify.css");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     BasePage.AddJavascriptInclude(Page, "/Custom/JohnsonFerry/Scripts/jquery.blockUI.js");
     BasePage.AddJavascriptInclude(Page, "/Custom/JohnsonFerry/Scripts/jquery.metadata.js"); //Required for setting inline options in tablesorter
     BasePage.AddJavascriptInclude(Page, "/Custom/JohnsonFerry/Scripts/jquery.tablesorter.min.js");
     BasePage.AddCssLink(Page, "/Custom/JohnsonFerry/CSS/tablesorter.css");
 }
        private void Page_Load(object sender, EventArgs e)
        {
            BasePage.AddCssLink(Page, CSSPathSetting);

            // jQuery MUST been loaded prior to these next few items..
            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/mustache.min.js");
            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/underscore.min.js");
            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/backbone.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/Cccev/Web/Scripts/centralaz.media.js");
        }
Beispiel #6
0
        private void RegisterClientScripts()
        {
            BasePage.AddCssLink(Page, "~/UserControls/Custom/Cccev/Core/js/tinymce/editor.css");
            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/Cccev/Core/js/tinymce/tiny_mce.js");

            // Add module-specific code through script manager to take advantage of client page lifecycle
            smpScripts.Scripts.Add(new ScriptReference("~/UserControls/Custom/Cccev/Core/js/editor.js"));

            if (richTextEnabled)
            {
                BasePage.AddCssLink(Page, StyleSelectCssSetting);
            }
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/bootstrap.css"));
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/responsive.css"));
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/main.css"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/vendor/bootstrap.min.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/vendor/modernizr-2.6.2-respond-1.1.0.min.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/plugins.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/main.js"));

            //System.Web.UI.HtmlControls.HtmlGenericControl main_js = new System.Web.UI.HtmlControls.HtmlGenericControl();
            //main_js.TagName = "script";
            //main_js.Attributes.Add("type", @"text/javascript");
            //main_js.Attributes.Add("src", ResolveUrl("/custom/johnsonferry/scripts/main.js"));
            //this.Page.Header.Controls.Add(main_js);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            //
            // Add in all the scripts we need.
            //
            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/Misc/Includes/jquery.colorbox-min.js");
            BasePage.AddCssLink(Page, "UserControls/Custom/HDC/Misc/Includes/colorbox.css");

            //
            // Determine the family_id and load the controls for viewstate.
            //
            family_id = Convert.ToInt32(Request.QueryString["FAMILY_ID"]);
            LoadFamilyAddresses(family_id);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblLoginError.Visible  = false;
                lblSignupError.Visible = false;
            }

            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/mustache.min.js");
            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/underscore.min.js");
            BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/backbone.min.js");
            BasePage.AddJavascriptInclude(Page, "usercontrols/custom/cccev/web/scripts/centralaz.web.min.js");
            BasePage.AddJavascriptInclude(Page, "usercontrols/custom/cccev/web/scripts/centralaz.facebook.min.js");
            BasePage.AddCssLink(Page, "usercontrols/custom/cccev/web/css/forms.css");

            GetState();
            ihState.Value = state;
        }
Beispiel #10
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
                smpScripts.Scripts.Add(new ScriptReference("~/Templates/Cccev/liger/js/jquery.galleryScroll.1.4.5.pack.js"));
                smpScripts.Scripts.Add(new ScriptReference("~/Templates/Cccev/liger/js/main.js"));
            }

            int channelId = int.Parse(Request.QueryString["channel"]);

            CurrentChannel = new Channel(channelId);

            if (channelId == Constants.NULL_INT || CurrentChannel.ChannelId == Constants.NULL_INT)
            {
                throw new ArgumentException("Channel ID is invalid!");
            }
        }
Beispiel #11
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            BasePage.AddJavascriptInclude(Page, "include/popupWindow.js");

            if (_area != null && _area.AreaID != -1)
            {
                CurrentPortalPage.TemplateControl.Title = PageTitleSetting.Replace("##AREA_NAME##", _area.Name);

                Lookup mainRole = new Lookup(Int32.Parse(MainLeaderRoleSetting));
                pnlLeaderHeading.Controls.Add(new LiteralControl(mainRole.Value));

                pnlTeamHeading.Controls.Add(new LiteralControl(TeamCaptionSetting));

                tdImages.Controls.Clear();

                foreach (AreaOutreachCoordinator leader in _area.OutreachCoordinators)
                {
                    Person person = new Person(leader.PersonId);

                    if (leader.AreaRole.LookupID == mainRole.LookupID)
                    {
                        if (person.Blob != null && person.Blob.ByteArray != null && person.Blob.ByteArray.Length > 0)
                        {
                            tdImages.Controls.Add(new LiteralControl(string.Format(
                                                                         "<img border=\"0\" src=\"cachedblob.aspx?guid={0}&width=200&height=200\" alt=\"{1}\">",
                                                                         person.Blob.GUID.ToString(),
                                                                         person.FullName)));
                        }

                        tblLeaders.Rows.Add(LeaderRow(leader, person, false, false));
                    }
                    else
                    {
                        tblTeam.Rows.Add(LeaderRow(leader, person, true, true));
                    }
                }
            }
            else
            {
                throw new ModuleException(CurrentPortalPage, CurrentModule, string.Format("The '{0}' AreaLeadership module requires a valid Area ID", CurrentModule.Title));
            }

            tdTeam.Visible = Boolean.Parse(ShowTeamSetting);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/bootstrap.css"));
            // Add styles here (i.e.: fixedToTop.css) that must cascade AFTER the standard bootstrap but BEFORE the
            // responsive stylesheet, as noted on the Twitter Bootstrap site at http://twitter.github.io/bootstrap/components.html
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/fixedToTop.css"));
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/responsive.css"));
            BasePage.AddCssLink(Page, ResolveUrl("/custom/johnsonferry/css/main.css"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/vendor/bootstrap.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/vendor/modernizr-2.6.2-respond-1.1.0.min.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/plugins.js"));
            BasePage.AddJavascriptInclude(Page, ResolveUrl("/custom/johnsonferry/scripts/main.js"));

            //System.Web.UI.HtmlControls.HtmlGenericControl main_js = new System.Web.UI.HtmlControls.HtmlGenericControl();
            //main_js.TagName = "script";
            //main_js.Attributes.Add("type", @"text/javascript");
            //main_js.Attributes.Add("src", ResolveUrl("/custom/johnsonferry/scripts/main.js"));
            //this.Page.Header.Controls.Add(main_js);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentPerson != null)
            {
                LoadFbAttributes();
            }

            if (!connectedToFacebook && !hasOptedOut)
            {
                BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/mustache.min.js");
                BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/underscore.min.js");
                BasePage.AddJavascriptInclude(Page, "include/scripts/custom/cccev/lib/backbone.min.js");
                BasePage.AddJavascriptInclude(Page, "usercontrols/custom/cccev/web/scripts/centralaz.web.min.js");
                BasePage.AddJavascriptInclude(Page, "usercontrols/custom/cccev/web/scripts/centralaz.facebook.min.js");
                BasePage.AddCssLink(Page, "usercontrols/custom/cccev/web/css/forms.css");

                GetState();
                ihState.Value = state;
            }
        }
Beispiel #14
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            //phBreadCrumbs.Controls.Clear();
            //phBreadCrumbs.Controls.Add(new LiteralControl(CurrentPortalPage.BreadCrumbs.ToString()));

            AddMetaTag("viewport", "width=device-width, initial-scale=1");
            orgName.Text = CurrentOrganization.Name;


            //BasePage.AddCssLink(this.Page, CurrentPortal.BootstrapCSSInclude);
            BasePage.AddCssLink(this.Page, "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css");
            //BasePage.AddCssLink(this.Page, "css/bootstrap-social.css");

            //BasePage.AddJavascriptInclude(this.Page, CurrentPortal.BootstrapJSInclude);
            //BasePage.AddJavascriptInclude(this.Page, "Include/MembersResponsive/bootstrap-hover-dropdown.min.js");
            //BasePage.AddJavascriptInclude(this.Page, "Include/MembersResponsive/jquery.matchHeight-min.js");
            //BasePage.AddJavascriptInclude(this.Page, "Include/MembersResponsive/template.js");
            BasePage.AddJavascriptInclude(this.Page, "https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js");
            BasePage.AddJavascriptInclude(this.Page, "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js");
            BasePage.AddJavascriptInclude(this.Page, "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js");
        }
        /// <summary>
        /// Initialize some of the page attributes and scripts.
        /// </summary>
        /// <param name="sender">Object causing this event to be triggered.</param>
        /// <param name="e">Parameters about the event.</param>
        protected void Page_Init(object sender, EventArgs e)
        {
            //
            // Request various javascript and CSS files to be included.
            //
            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
            BasePage.AddJavascriptInclude(Page, "include/scripts/jqueryui/js/jquery-ui-1.7.3.custom.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/Misc/Includes/jquery-ui-timepicker-addon.js");
            BasePage.AddCssLink(Page, "include/scripts/jqueryui/css/custom-theme/jquery-ui-.custom.css");

            //
            // Setup the document browser/uploader.
            //
            mdlDocuments.Title          = "Select a Document";
            mdlDocuments.Url            = "DocumentBrowser.aspx?callback=selectDocument&DocumentTypeFilter=#documentTypeFilter#&SelectedID=#selectedID#&DocumentTypeID=#documentTypeID#";
            mdlDocuments.Width          = 310;
            mdlDocuments.Height         = 200;
            mdlDocuments.JSFunctionName = "openChooseDocumentWindow(documentTypeFilter, selectedID, documentTypeID)";

            //
            // Setup the lookup drop down list.
            //
            ddlTopicArea.Items.Add(new ListItem("", "-1"));
            String[] topicAreas = TopicAreaSetting.Split(',');
            foreach (String topicArea in topicAreas)
            {
                Lookup area = new Lookup(Convert.ToInt32(topicArea));

                ddlTopicArea.Items.Add(new ListItem(area.Value, area.LookupID.ToString()));
            }

            //
            // Load the promotion into memory.
            //
            LoadRequest();
        }
 /// <summary>
 /// Load in jQuery and CSS required to properly display this module.
 /// </summary>
 /// <param name="sender">The object that triggered this event.</param>
 /// <param name="e">Details about the event.</param>
 private void Page_Init(object sender, EventArgs e)
 {
     BasePage.AddJavascriptInclude(Page, "//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js");
     BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/Misc/Includes/jquery.rs.slideshow.min.js");
     BasePage.AddCssLink(Page, "UserControls/Custom/HDC/Misc/Includes/DisplaySign.css");
 }
 private void RegisterScripts()
 {
     BasePage.AddJavascriptInclude(Page, ResolveUrl("/Custom/JohnsonFerry/Scripts/jquery.numericalscale.js"));
     BasePage.AddCssLink(Page, ResolveUrl("/Custom/JohnsonFerry/CSS/spiritualgiftsurvey.css"));
 }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            BasePage.AddJavascriptInclude(Page, "http://code.jquery.com/jquery-latest.min.js");
            //BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/bbq.js");
            //BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/inputs.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.xml2json.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery-ui-1.8.10.custom.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.cookie.js");
            //BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.form.js");
            //BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.form.wizard-3.0.5.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.inputmask.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/jquery.validate.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/tofsla_forms.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/WVC/MinPart/js/minpart_custom.js");
            BasePage.AddCssLink(Page, "UserControls/Custom/WVC/MinPart/css/minpart_screen_custom.css", "screen");

            //
            // Deal with redirects.
            //

            if (!Page.IsPostBack)
            {
                iRedirect.Value = string.Empty;
                if (Request.QueryString["requestpage"] != null)
                    iRedirect.Value = string.Format("default.aspx?page={0}", Request.QueryString["requestpage"]);
                if (iRedirect.Value == string.Empty && Request.QueryString["requestUrl"] != null)
                    iRedirect.Value = Request.QueryString["requestUrl"];
                if (iRedirect.Value == string.Empty)
                    iRedirect.Value = string.Format("default.aspx?page={0}", RedirectPageIDSetting);
            }

            var maritalStatuses = new LookupType(84);

            /*for (int i = 0; i < maritalStatuses.Values.Count; i++)
            {
                maritalStatus.Items.Add(Convert.ToString(maritalStatuses.Values[i]));
            }*/


            for (int i = Convert.ToInt16(DateTime.Now.Year)-120; i <= Convert.ToInt16(DateTime.Now.Year); i++)
            {
                birthYear.Items.Add(Convert.ToString(i));
            }

            signedYear.Items.Add(Convert.ToString(DateTime.Now.Year));

            var person = new Person(ArenaContext.Current.Person);

            print.HRef = String.Join("",new String[]
            {ArenaContext.Current.ServerUrl,"/default.aspx?page=",PrintPageIDSetting.ToString(),"&guid=",ArenaContext.Current.Person.Guid.ToString()}
            );

            postLocation.Value = String.Join("", new String[] 
            {ArenaContext.Current.ServerUrl,"/default.aspx?page=",RedirectPageIDSetting.ToString()}
            );


            user_name.Value = person.Logins[0].LoginID;
            firstName.Value = person.FirstName;
            lastName.Value = person.LastName;
            email.Value = person.Emails.FirstActive;
            maritalStatus.Value = person.MaritalStatus.ToString();
            gender.Value = person.Gender.ToString();
            birthYear.Value = person.BirthDate.Year.ToString();
            birthMonth.Value = person.BirthDate.Month.ToString();
            birthDay.Value = person.BirthDate.Day.ToString();
            socialsecurity.Value = person.SSN.ToString();
            foreach (PersonAddress address in person.Addresses)
            {
                if (address.Primary)
                {
                    streetAddress1.Value = address.Address.StreetLine1; 
                    streetAddress2.Value = address.Address.StreetLine2;
                    city.Value = address.Address.City;
                    zipCode.Value = address.Address.PostalCode;
                    state.Value = address.Address.State;
                }
            }
            foreach (PersonPhone phone in person.Phones)
            {
                switch (phone.PhoneType.Value)
                {
                    case "Main/Home":
                        homePhone.Value = phone.Number;
                        break;
                    case "Business":
                        workPhone.Value = phone.Number;
                        break;
                    case "Cell":
                        cellPhone.Value = phone.Number;
                        cellsms.Checked = phone.SMSEnabled;
                        break;
                    default:
                        break;
                }
            }

            foreach (Control field in this.Controls)
            {
                // check this out..
                if (field.GetType() == typeof(HtmlInputText))
                {
                    var tb = (HtmlInputText)Convert.ChangeType(field, typeof(HtmlInputText));
                    if (tb.Attributes["attid"] != null)
                    {
                        var pa = new PersonAttribute(person.PersonID, (int)Convert.ChangeType(tb.Attributes["attid"], typeof(int)));
                        tb.Value = Convert.ToString(pa);
                    }
                }
                else if (field.GetType() == typeof(HtmlTextArea))
                {
                    var tb = (HtmlTextArea)Convert.ChangeType(field, typeof(HtmlTextArea));
                    if (tb.Attributes["attid"] != null)
                    {
                        var pa = new PersonAttribute(person.PersonID, (int)Convert.ChangeType(tb.Attributes["attid"], typeof(int)));
                        tb.Value = Convert.ToString(pa);
                    }
                }
                else if (field.GetType() == typeof(HtmlInputRadioButton))
                {
                    var tb = (HtmlInputRadioButton)Convert.ChangeType(field, typeof(HtmlInputRadioButton));
                    if (tb.Attributes["attid"] != null)
                    {
                        var pa = new PersonAttribute(person.PersonID, (int)Convert.ChangeType(tb.Attributes["attid"], typeof(int)));
                        if ((pa.IntValue == 1) && (tb.Value == "Yes"))
                        {
                            tb.Attributes["checked"] = Convert.ToString(pa);
                        }
                        else if ((pa.IntValue == 0) && (tb.Value == "No"))
                        {
                            tb.Attributes["checked"] = Convert.ToString(pa);
                        }
                    }
                }
            }
            
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            int profileID = -1, i;
            ProfileCollection profiles;
            ServingProfile    servingProfile;
            ProfileMember     pm;
            CheckBox          cb;
            Literal           lt;

            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);

            //
            // Deal with redirects.
            //
            if (!Page.IsPostBack)
            {
                iRedirect.Value = string.Empty;
                if (Request.QueryString["requestpage"] != null)
                {
                    iRedirect.Value = string.Format("default.aspx?page={0}", Request.QueryString["requestpage"]);
                }
                if (iRedirect.Value == string.Empty && Request.QueryString["requestUrl"] != null)
                {
                    iRedirect.Value = Request.QueryString["requestUrl"];
                }
                if (iRedirect.Value == string.Empty)
                {
                    iRedirect.Value = string.Format("default.aspx?page={0}", RedirectPageIDSetting);
                }
            }

            //
            // Retrieve the profile ID we are going to work with.
            //
            if (ProfileIDSetting.Contains("|"))
            {
                profileID = Int32.Parse(ProfileIDSetting.Split('|')[1]);
            }
            else
            {
                profileID = Int32.Parse(ProfileIDSetting);
            }

            //
            // Walk all the child profiles (only one level deep, non-recursive)
            // and add them as check-boxes to the page. If the user is already
            // a member of one of the profiles then that box is checked and
            // disabled.
            //
            profiles = new Profile(profileID).ChildProfiles;
            for (i = 0; i < profiles.Count; i++)
            {
                //
                // Find the member in the profile if they are already there.
                //
                pm = new ProfileMember(profiles[i].ProfileID, ArenaContext.Current.Person);

                //
                // Create either a CheckBox or a Radio button depending on module
                // settings.
                //
                if (MaxAnswersSetting == 1)
                {
                    cb = (CheckBox) new RadioButton();
                    ((RadioButton)cb).GroupName = "ProfileGroup" + profileID.ToString();
                }
                else
                {
                    cb = new CheckBox();
                }

                //
                // Fill in all the control information and add it to the list.
                //
                cb.ID       = profiles[i].ProfileID.ToString();
                cb.Text     = profiles[i].Title;
                cb.CssClass = "sjt_profile";
                if (pm.ProfileID != -1)
                {
                    cb.Enabled   = false;
                    cb.Checked   = true;
                    cb.CssClass += " sjt_disabled";
                }
                phProfiles.Controls.Add(cb);

                //
                // If this is a serving profile then make sure it isn't full.
                //
                if (profiles[i].ProfileType == ProfileType.Serving)
                {
                    servingProfile = new ServingProfile(profiles[i].ProfileID);
                    if (servingProfile.VolunteersNeeded > 0 && servingProfile.ProfileActiveMemberCount >= servingProfile.VolunteersNeeded)
                    {
                        cb.Enabled   = false;
                        cb.Text     += " (currently full)";
                        cb.CssClass += " sjt_full";
                    }
                }

                //
                // Add in a newline character.
                //
                lt      = new Literal();
                lt.Text = "<br />";
                phProfiles.Controls.Add(lt);
            }

            //
            // Add in a "none of the above" option if requested. This does
            // not do anything on submit, but resolves any "I changed my mind
            // how do I get out" questions.
            //
            if (NoneAboveSetting != false)
            {
                //
                // Create either the checkbox or the radio button depending on
                // the module setting.
                //
                if (MaxAnswersSetting == 1)
                {
                    cb = (CheckBox) new RadioButton();
                    ((RadioButton)cb).GroupName = "ProfileGroup" + profileID.ToString();
                }
                else
                {
                    cb = new CheckBox();
                }

                //
                // Setup the information about the none of the above control.
                //
                cb.ID   = "-1";
                cb.Text = "None of the above";
                phProfiles.Controls.Add(cb);

                //
                // Add in a newline character.
                //
                lt      = new Literal();
                lt.Text = "<br />";
                phProfiles.Controls.Add(lt);
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            BasePage.AddJavascriptInclude(Page, "include/popupWindow.js");

            // get topicAreas search
            ddTopicArea.Visible = TopicAreaListVisibleSetting.ToLower() == "true";

            StringBuilder calendarScripts = new StringBuilder();

            if (CalendarCssSetting != string.Empty)
            {
                calendarScripts.Append("<link href=\"" + Utilities.GetApplicationPath() + "/css/" + CalendarCssSetting + "\" type=\"text/css\" rel=\"stylesheet\">");
            }
            else
            {
                calendarScripts.Append("<link href=\"" + Utilities.GetApplicationPath() + "/css/calendar.css\" type=\"text/css\" rel=\"stylesheet\">");
            }

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "calendarPopup", calendarScripts.ToString());

            if (!IsPostBack)
            {
                if (HideCalendarControlsSetting.ToLower() == "true")
                {
                    tblCalendarControls.Visible = false;
                }
                else
                {
                    for (int i = 0; i < 12; i++)
                    {
                        ListItem item = new ListItem(monthNames[i], Convert.ToString(i + 1));
                        if ((i + 1) == DateTime.Now.Month)
                        {
                            item.Selected = true;
                        }
                        ddMonth.Items.Add(item);
                    }

                    for (int i = (DateTime.Now.Year - 1); i <= (DateTime.Now.Year + 1); i++)
                    {
                        ListItem item = new ListItem(i.ToString(), i.ToString());
                        if (i == DateTime.Now.Year)
                        {
                            item.Selected = true;
                        }
                        ddYear.Items.Add(item);
                    }

                    if (ddTopicArea.Visible)
                    {
                        ListItem li = new ListItem("All", TopicAreasSetting);
                        ddTopicArea.Items.Add(li);

                        if (TopicAreasSetting == string.Empty)
                        {
                            new LookupType(SystemLookupType.TopicArea).Values.LoadDropDownList(ddTopicArea);
                        }
                        else
                        {
                            foreach (string topicArea in TopicAreasSetting.Split(','))
                            {
                                int topicID = -1;
                                if (Int32.TryParse(topicArea, out topicID))
                                {
                                    Lookup topicLu = new Lookup(topicID);
                                    ddTopicArea.Items.Add(new ListItem(topicLu.Value, topicLu.LookupID.ToString()));
                                }
                            }
                        }
                    }
                }

                BuildCalendar();
            }
        }
 private void RegisterScripts()
 {
     BasePage.AddJavascriptInclude(Page, ResolveUrl("/Custom/JohnsonFerry/Scripts/ChurchonlineCountdown.js"));
     BasePage.AddCssLink(Page, ResolveUrl(CssFileSetting));
 }