fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f51cea
)
Some more pages.
author
Radek Czajka
<rczajka@rczajka.pl>
Fri, 21 Oct 2022 16:47:17 +0000
(18:47 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Fri, 21 Oct 2022 16:47:17 +0000
(18:47 +0200)
src/ajaxable/templates/ajaxable/form.html
patch
|
blob
|
history
src/ajaxable/templates/ajaxable/form_on_page.html
patch
|
blob
|
history
src/catalogue/templates/catalogue/custom_pdf_form.html
patch
|
blob
|
history
src/newsletter/forms.py
patch
|
blob
|
history
src/suggest/forms.py
patch
|
blob
|
history
src/wolnelektury/static/2022/more.scss
patch
|
blob
|
history
src/wolnelektury/templates/404.html
patch
|
blob
|
history
diff --git
a/src/ajaxable/templates/ajaxable/form.html
b/src/ajaxable/templates/ajaxable/form.html
index
0c97b65
..
8cc3004
100644
(file)
--- a/
src/ajaxable/templates/ajaxable/form.html
+++ b/
src/ajaxable/templates/ajaxable/form.html
@@
-9,13
+9,21
@@
{% load honeypot %}
{% render_honeypot_field %}
{% endif %}
{% load honeypot %}
{% render_honeypot_field %}
{% endif %}
- <ol>
- <div id="id_{% if form_prefix %}{{ form_prefix }}-{% endif %}__all__"></div>
- {% block form_fields %}
- {{ form.as_ul }}
- {% endblock %}
- <li><input type="submit" value="{{ submit }}"/></li>
+ {% if request.EXPERIMENTS.layout.value %}
+ {{ form.as_p }}
+ <p class="helptext">
+ {{ form.data_processing }}
+ </p>
+ <button>{{ submit }}</button>
+ {% else %}
+ <ol>
+ <div id="id_{% if form_prefix %}{{ form_prefix }}-{% endif %}__all__"></div>
+ {% block form_fields %}
+ {{ form.as_p }}
+ {% endblock %}
+ <li><input type="submit" value="{{ submit }}"/></li>
</ol>
</ol>
+ {% endif %}
</form>
<div class="form-extra">
</form>
<div class="form-extra">
diff --git
a/src/ajaxable/templates/ajaxable/form_on_page.html
b/src/ajaxable/templates/ajaxable/form_on_page.html
index
e5c27a8
..
08f713d
100644
(file)
--- 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 %}
{% 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
ef865bc
..
cfebdf3
100644
(file)
--- a/
src/catalogue/templates/catalogue/custom_pdf_form.html
+++ b/
src/catalogue/templates/catalogue/custom_pdf_form.html
@@
-7,6
+7,10
@@
<form id='custom-pdf-form' action="" method="post" accept-charset="utf-8" class="cuteform">
{% csrf_token %}
{% render_honeypot_field %}
<form id='custom-pdf-form' action="" method="post" accept-charset="utf-8" class="cuteform">
{% csrf_token %}
{% render_honeypot_field %}
+ {% if request.EXPERIMENTS.layout.value %}
+ {{ form.as_p }}
+ <button type="submit">{% trans "Download" %}</button>
+ {% else %}
<ol>
{{ form.nofootnotes|pretty_checkbox }}
{{ form.nothemes|pretty_checkbox }}
<ol>
{{ form.nofootnotes|pretty_checkbox }}
{{ form.nothemes|pretty_checkbox }}
@@
-17,4
+21,5
@@
<li><input type="submit" value="{% trans "Download" %}"/></li>
</ol>
<li><input type="submit" value="{% trans "Download" %}"/></li>
</ol>
+ {% endif %}
</form>
</form>
diff --git
a/src/newsletter/forms.py
b/src/newsletter/forms.py
index
ff7005a
..
16f216e
100644
(file)
--- 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(
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
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 <a href="https://nowoczesnapolska.org.pl/prywatnosc/">polityce prywatności.</a>'''
Osobom, których dane są zbierane, przysługuje prawo dostępu do treści swoich danych oraz ich poprawiania.
Więcej informacji w <a href="https://nowoczesnapolska.org.pl/prywatnosc/">polityce prywatności.</a>'''
+ 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))
@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
1fdfc60
..
6a36fb6
100644
(file)
--- 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)
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
data_processing_part2 = SuggestForm.data_processing_part2
diff --git
a/src/wolnelektury/static/2022/more.scss
b/src/wolnelektury/static/2022/more.scss
index
2743038
..
fd03b4e
100644
(file)
--- a/
src/wolnelektury/static/2022/more.scss
+++ b/
src/wolnelektury/static/2022/more.scss
@@
-349,10
+349,9
@@
form {
margin-top: 24px;
}
margin-top: 24px;
}
- input {
+ input
, textarea, select
{
display: block;
width: 100%;
display: block;
width: 100%;
- height: 56px;
background: #FFFFFF;
color: black;
border: 1px solid #D5ECED;
background: #FFFFFF;
color: black;
border: 1px solid #D5ECED;
@@
-361,6
+360,9
@@
form {
padding: 10px;
outline: 0;
}
padding: 10px;
outline: 0;
}
+ input, select {
+ height: 56px;
+ }
input[type=checkbox], input[type=radio] {
display: inline;
float: left;
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
63d3cac
..
06b57d8
100644
(file)
--- 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 %}
{% 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 %}
{% block titleextra %}404 – {% trans "Page does not exist" %}{% endblock %}