From: Radek Czajka Date: Fri, 21 Oct 2022 16:47:17 +0000 (+0200) Subject: Some more pages. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/4bff37c73cb3e5035954af699a2c52065c993197?hp=8f51cea59b3cc79f091627e08b3b9f4f24f3f232 Some more pages. --- diff --git a/src/ajaxable/templates/ajaxable/form.html b/src/ajaxable/templates/ajaxable/form.html index 0c97b6527..8cc30043d 100644 --- a/src/ajaxable/templates/ajaxable/form.html +++ b/src/ajaxable/templates/ajaxable/form.html @@ -9,13 +9,21 @@ {% load honeypot %} {% render_honeypot_field %} {% endif %} -
    -
    - {% block form_fields %} - {{ form.as_ul }} - {% endblock %} -
  1. + {% if request.EXPERIMENTS.layout.value %} + {{ form.as_p }} +

    + {{ form.data_processing }} +

    + + {% else %} +
      +
      + {% block form_fields %} + {{ form.as_p }} + {% endblock %} +
    + {% endif %}
    diff --git a/src/ajaxable/templates/ajaxable/form_on_page.html b/src/ajaxable/templates/ajaxable/form_on_page.html index e5c27a807..08f713df5 100644 --- a/src/ajaxable/templates/ajaxable/form_on_page.html +++ b/src/ajaxable/templates/ajaxable/form_on_page.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} {% block titleextra %}{{ title }}{% endblock %} diff --git a/src/catalogue/templates/catalogue/custom_pdf_form.html b/src/catalogue/templates/catalogue/custom_pdf_form.html index ef865bc04..cfebdf39c 100644 --- a/src/catalogue/templates/catalogue/custom_pdf_form.html +++ b/src/catalogue/templates/catalogue/custom_pdf_form.html @@ -7,6 +7,10 @@
    {% csrf_token %} {% render_honeypot_field %} + {% if request.EXPERIMENTS.layout.value %} + {{ form.as_p }} + + {% else %}
      {{ form.nofootnotes|pretty_checkbox }} {{ form.nothemes|pretty_checkbox }} @@ -17,4 +21,5 @@
    + {% endif %}
    diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index ff7005a79..16f216e31 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -14,7 +14,7 @@ from .models import Newsletter class NewsletterForm(Form): email_field = 'email' agree_newsletter = BooleanField( - required=False, initial=False, label=_('I want to receive Wolne Lektury\'s newsletter.')) + required=False, initial=False, label=_('I want to receive Wolne Lektury\'s newsletter.'), label_suffix=False) mailing = False mailing_field = 'agree_newsletter' newsletter = None @@ -27,6 +27,13 @@ Podanie danych osobowych jest dobrowolne.''' Osobom, których dane są zbierane, przysługuje prawo dostępu do treści swoich danych oraz ich poprawiania. Więcej informacji w polityce prywatności.''' + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Move the newsletter field to the end. + f = self.fields['agree_newsletter'] + del self.fields['agree_newsletter'] + self.fields['agree_newsletter'] = f + @property def data_processing(self): return mark_safe('%s %s %s' % (self.data_processing_part1, self.data_processing_part2, self.data_processing_part3)) diff --git a/src/suggest/forms.py b/src/suggest/forms.py index 1fdfc6089..6a36fb625 100644 --- a/src/suggest/forms.py +++ b/src/suggest/forms.py @@ -66,8 +66,8 @@ class PublishingSuggestForm(NewsletterForm): email_field = 'contact' contact = forms.CharField(label=_('Contact'), max_length=120, required=False) books = forms.CharField(label=_('books'), widget=forms.Textarea, required=True) - ebook = forms.BooleanField(label=_('ebook'), required=False, initial=True) - audiobook = forms.BooleanField(label=_('audiobook'), required=False) + ebook = forms.BooleanField(label=_('ebook'), required=False, initial=True, label_suffix='') + audiobook = forms.BooleanField(label=_('audiobook'), required=False, label_suffix='') data_processing_part2 = SuggestForm.data_processing_part2 diff --git a/src/wolnelektury/static/2022/more.scss b/src/wolnelektury/static/2022/more.scss index 2743038d0..fd03b4e12 100644 --- a/src/wolnelektury/static/2022/more.scss +++ b/src/wolnelektury/static/2022/more.scss @@ -349,10 +349,9 @@ form { margin-top: 24px; } - input { + input, textarea, select { display: block; width: 100%; - height: 56px; background: #FFFFFF; color: black; border: 1px solid #D5ECED; @@ -361,6 +360,9 @@ form { padding: 10px; outline: 0; } + input, select { + height: 56px; + } input[type=checkbox], input[type=radio] { display: inline; float: left; diff --git a/src/wolnelektury/templates/404.html b/src/wolnelektury/templates/404.html index 63d3cacb6..06b57d8a9 100644 --- a/src/wolnelektury/templates/404.html +++ b/src/wolnelektury/templates/404.html @@ -1,6 +1,13 @@ -{% extends "base/base.html" %} +{% extends request.EXPERIMENTS.layout.value|yesno:"2022/base_simple.html,base/base.html" %} {% load i18n %} +{% block settings %} + {% load title %} + {% trans "Page does not exist" as title %} + {% title title %} +{% endblock %} + + {% block titleextra %}404 – {% trans "Page does not exist" %}{% endblock %}