summaryrefslogtreecommitdiff
path: root/app/lttr
diff options
context:
space:
mode:
Diffstat (limited to 'app/lttr')
-rw-r--r--app/lttr/templates/lttr/postcard_subscribe.html23
-rw-r--r--app/lttr/views.py3
2 files changed, 25 insertions, 1 deletions
diff --git a/app/lttr/templates/lttr/postcard_subscribe.html b/app/lttr/templates/lttr/postcard_subscribe.html
new file mode 100644
index 0000000..b4bbfd4
--- /dev/null
+++ b/app/lttr/templates/lttr/postcard_subscribe.html
@@ -0,0 +1,23 @@
+{% load typogrify_tags %}
+<html style="border:none !important;" dir="ltr" lang="en-US">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet"
+ href="/media/screenv11.css"
+ media="screen">
+</head>
+<body>
+ <form action="" method="post" target='_parent' class="generic-form flex newsletter-subscribe">{% csrf_token %}
+ {% for field in form %}
+ <fieldset>
+ {{field.label_tag}}
+ {{field}}
+ </fieldset>
+ {% if forloop.last %}<input type="submit" name="post" class="btn" value="Subscribe" />{%endif%}
+ </form>
+ <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small>
+ {%endfor%}
+</body>
+</html>
diff --git a/app/lttr/views.py b/app/lttr/views.py
index c4414b2..f0f40e7 100644
--- a/app/lttr/views.py
+++ b/app/lttr/views.py
@@ -105,6 +105,7 @@ class UnsubscribeRequestView(DetailView):
context['newsletter'] = self.kwargs['slug']
return context
+
class PostcardSubscribeView(CreateView):
"""
Return a subscribe form for iframe embedding
@@ -114,7 +115,7 @@ class PostcardSubscribeView(CreateView):
def get_template_names(self):
- return ["lttr/%s_subscribe.html" % self.slug, 'lttr/subscribe.html']
+ return ["lttr/postcard_subscribe.html",]
def get_success_url(self):
return reverse_lazy('card:subscribed')