diff options
author | lxf <sng@luxagraf.net> | 2021-10-28 21:00:13 -0400 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2021-10-28 21:00:13 -0400 |
commit | 73fa4f3becbbddb4f81357bd74135785e85be990 (patch) | |
tree | a71de9323b8b3651ea11c4ef5c630b4e11605071 /app | |
parent | 6802320ead50c9f13e17d942fa333cf6c812691d (diff) |
lttr: added postcard subscribe template
Diffstat (limited to 'app')
-rw-r--r-- | app/lttr/templates/lttr/postcard_subscribe.html | 23 | ||||
-rw-r--r-- | app/lttr/views.py | 3 |
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') |