/
one_newsletter_signup.html
43 lines (35 loc) · 1.77 KB
/
one_newsletter_signup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{% extends 'base-resp.html' %}
{#
Base template for pages used to signup for one particular newsletter.
Inheriting templates should put their body content in the newsletter_content block.
They must also set the newsletter_title and newsletter_id variables.
Finally, they can fill in the blocks 'success_en' and 'success_non_en' with
the page body to display to English and to non-English users after they
subscribe. The default text here can be used as an example, but is probably
not exactly right for newsletters other than the Mozilla & You newsletter.
#}
{% block email_form %}{% endblock %}{# Don't need another signup form on the page. #}
{% block body_id %}newsletter{% endblock %}
{% from "macros.html" import email_newsletter_form with context %}
{% block site_css %}
{{ super() }}
{{ css('newsletter') }}
{% endblock %}
{% block content %}
<div id="doc">
{% if request.newsletter_success %}
{# User has been subscribed #}
<div id="email-form" class="thank billboard">
<h3>{{ _('Thanks for Subscribing!') }}</h3>
{# user will have to confirm before starting subscription #}
{% block success_confirm %}
<p>{% trans %}Thanks! Please check your inbox to confirm your subscription.{% endtrans %}</p>
<p>{% trans %}You'll receive an email from mozilla@e.mozilla.org to confirm your subscription. If you don't see it, check your spam filter. You must confirm your subscription to receive our newsletter.{% endtrans %}</p>
{% endblock success_confirm %}
</div>
{% else %}
{% block newsletter_content %}{% endblock newsletter_content %}
{{ email_newsletter_form(newsletter_id=newsletter_id,title=newsletter_title,footer=False) }}
{% endif %}
</div><!-- doc -->
{% endblock content %}