Newsletter thanks view.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 20 Oct 2022 09:51:36 +0000 (11:51 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 20 Oct 2022 09:51:36 +0000 (11:51 +0200)
src/newsletter/templates/newsletter/2022/subscribed.html [new file with mode: 0644]
src/newsletter/views.py

diff --git a/src/newsletter/templates/newsletter/2022/subscribed.html b/src/newsletter/templates/newsletter/2022/subscribed.html
new file mode 100644 (file)
index 0000000..b93a4f6
--- /dev/null
@@ -0,0 +1,28 @@
+{% extends "2022/base.html" %}
+{% load i18n %}
+
+{% block content %}
+  <div class="l-container">
+    <div class="l-breadcrumb">
+      <a href="/"><span>Strona główna</span></a>
+      <a>{{ page_title }}</a>
+    </div>
+  </div>
+
+  <main class="l-main">
+    <div class="l-checkout__box" style="margin-bottom: 70px;">
+      <div class="l-checkout__box__header">
+        <div class="l-checkout__box__header__content">
+          <h1>{{ page_title }}</h1>
+        </div>
+      </div>
+
+      <div class="l-checkout__cols">
+        <div class="l-checkout__col"></div>
+        <div class="l-checkout__col">
+          {% trans "You have subscribed to Wolne Lektury newsletter." %}
+        </div>
+      </div>
+    </div>
+  </main>
+{% endblock %}
index 6c2be8a..11256ca 100644 (file)
@@ -32,7 +32,12 @@ def subscribe_form(request, slug=''):
 
 
 def subscribed(request):
-    return render(request, 'newsletter/subscribed.html', {
+    new_layout = request.EXPERIMENTS['layout'].value
+    if new_layout:
+        template_name = 'newsletter/2022/subscribed.html'
+    else:
+        template_name = 'newsletter/subscribed.html'
+    return render(request, template_name, {
         'page_title': _('Subscribed'),
     })