Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom newsletters #720

Merged
merged 1 commit into from
Sep 6, 2017
Merged

Add support for custom newsletters #720

merged 1 commit into from
Sep 6, 2017

Conversation

alanmoo
Copy link
Contributor

@alanmoo alanmoo commented Sep 6, 2017

For #691

This allows (permissioned) users to type in the newsletter name when creating a signup component, and passes that name to the signup form when it gets used on opportunity pages.

@alanmoo alanmoo requested a review from gideonthomas September 6, 2017 16:35
gideonthomas
gideonthomas previously approved these changes Sep 6, 2017
Copy link
Contributor

@gideonthomas gideonthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with nits.

Also, Travis is failing :P

@@ -54,4 +60,4 @@ def __str__(self):

class Meta:
verbose_name = 'Custom Page'
verbose_name_plural = 'Custom Pages'
verbose_name_plural = 'Custom Pages'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo this change?

newsletter = models.CharField(
max_length=100,
help_text="The (pre-existing) SalesForce newsletter to sign up for",
default="mozilla-leadership-network"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to allow them to leave the field blank and then in the db it defaults to this? Or is this just a default for existing entries and they always have to put something in for this field in the admin interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latter. Also the fact that new entries get pre-populated with this in the admin is helpful too.

@@ -69,7 +69,7 @@ <h1 class="h1-white">{{ page.landingpage.header }}</h1>
<div class="row">{% if page.landingpage.signup %}
<div class="cms col-md-6">{{ page.landingpage.content | safe }}</div>
<div class="col-md-5 offset-md-1">
<div class="join-us half-width col" data-cta-header="{{ page.landingpage.signup.header | escape }}" data-cta-description="{{ page.landingpage.signup.description | escape }}"></div>
<div class="join-us half-width col" data-cta-header="{{ page.landingpage.signup.header | escape }}" data-cta-description="{{ page.landingpage.signup.description | escape }}" data-newsletter="{{ page.landingpage.signup.newsletter }}"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know if you want to escape this as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, just a string here, not HTML.

@alanmoo
Copy link
Contributor Author

alanmoo commented Sep 6, 2017

@gideonthomas I re-added the newline, think I need you to approve again.

@alanmoo alanmoo merged commit 0c98e7a into master Sep 6, 2017
gvn pushed a commit that referenced this pull request Sep 18, 2017
gvn pushed a commit that referenced this pull request Sep 18, 2017
gvn added a commit that referenced this pull request Sep 18, 2017
@gvn gvn deleted the multi-newsletter branch January 12, 2018 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants