Exemplo n.º 1
0
        private void LoadSettings()
        {
            siteSettings      = CacheHelper.GetCurrentSiteSettings();
            siteRoot          = SiteUtils.GetNavigationSiteRoot();
            spnFormat.Visible = showFormatOptions;

            lnkMoreInfo.NavigateUrl = siteRoot + "/eletter/Default.aspx";
            lnkMoreInfo.Visible     = showmoreInfoLink;
            if (showList)
            {
                siteAvailableSubscriptions = NewsletterHelper.GetAvailableNewslettersForCurrentUser(siteSettings.SiteGuid);
            }
        }
Exemplo n.º 2
0
        private void LoadSettings()
        {
            siteSettings      = CacheHelper.GetCurrentSiteSettings();
            siteRoot          = SiteUtils.GetNavigationSiteRoot();
            spnFormat.Visible = showFormatOptions;
            regexEmail.ValidationExpression = SecurityHelper.RegexEmailValidationPattern;

            lnkMoreInfo.NavigateUrl = siteRoot + "/eletter/";
            lnkMoreInfo.Visible     = showmoreInfoLink;
            if (showList)
            {
                siteAvailableSubscriptions = NewsletterHelper.GetAvailableNewslettersForCurrentUser(siteSettings.SiteGuid);
            }
        }
Exemplo n.º 3
0
 private void GetSubscriptions()
 {
     if ((siteSettings != null) && (siteUser != null))
     {
         siteAvailableSubscriptions = NewsletterHelper.GetAvailableNewslettersForCurrentUser(siteSettings.SiteGuid);
         userSubscriptions          = subscriptions.GetListByUser(siteSettings.SiteGuid, siteUser.UserGuid);
         foreach (LetterSubscriber s in userSubscriptions)
         {
             if (!s.IsVerified)
             {
                 hasUnverifiedSubscriptions = true;
             }
         }
     }
 }
Exemplo n.º 4
0
        private void LoadSettings()
        {
            if (Request.QueryString["token"] != null)
            {
                authToken = Request.QueryString["token"];
            }
            else if (Request.Form["token"] != null)
            {
                authToken = Request.Form["token"];
            }

            timeOffset = SiteUtils.GetUserTimeOffset();
            timeZone   = SiteUtils.GetUserTimeZone();

            siteAvailableSubscriptions    = NewsletterHelper.GetAvailableNewslettersForCurrentUser(siteSettings.SiteGuid);
            IncludeDescriptionInList      = displaySettings.IncludeNewsletterDescriptionInList;
            pnlSubscribe.Visible          = displaySettings.ShowNewsLetters;
            lblNewsletterListHeading.Text = displaySettings.NewsletterListHeading.Coalesce(Resource.NewsletterPreferencesHeader);

            tokenUrl   = SiteRoot + "/Secure/OpenIdRpxHandler.aspx";
            rpxBaseUrl = "https://rpxnow.com";
            rpxApiKey  = siteSettings.RpxNowApiKey;

            if (WebConfigSettings.UseOpenIdRpxSettingsFromWebConfig)
            {
                if (WebConfigSettings.OpenIdRpxApiKey.Length > 0)
                {
                    rpxApiKey = WebConfigSettings.OpenIdRpxApiKey;
                }
            }


            regexEmail.ErrorMessage = Resource.RegisterEmailRegexMessage;

            returnUrlCookieName = "returnurl" + siteSettings.SiteId.ToString(CultureInfo.InvariantCulture);

            termsOfUse = siteSettings.RegistrationAgreement;
            if (termsOfUse.Length == 0)
            {
                termsOfUse = ResourceHelper.GetMessageTemplate("RegisterLicense.config");
            }

            AddClassToBody("rpxhandler");
        }
Exemplo n.º 5
0
        void btnSubscribe_Click(object sender, EventArgs e)
        {
            Page.Validate(validationGroup);
            if (!Page.IsValid)
            {
                return;
            }

            if (siteAvailableSubscriptions == null)
            {
                siteAvailableSubscriptions = NewsletterHelper.GetAvailableNewslettersForCurrentUser(siteSettings.SiteGuid);
            }

            if ((siteAvailableSubscriptions != null) && (siteAvailableSubscriptions.Count == 0))
            {
                pnlSubscribe.Visible     = false;
                pnlNoNewsletters.Visible = true;
                return;
            }

            currentUser = SiteUtils.GetCurrentSiteUser();
            DoSubscribe();
            if (hdnJs.Value != "js")
            {
                // this means javascript was not enabled so this was a full postback not an ajax postback
                // to get out of postback we will redirect to a thank you page
                WebUtils.SetupRedirect(this, siteRoot + "/eletter/ThankYou.aspx");
                return;
            }
            else
            {
                pnlSubscribe.Visible = false;
                pnlThanks.Visible    = true;
                UpdatePanel1.Update();
            }
        }