forked from TagesschuleElementa/www.tagesschule-elementa.ch
fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* modernizr v3.6.0
|
||||
* Build https://modernizr.com/download?-cssanimations-touchevents-setclasses-dontmin
|
||||
* Build https://modernizr.com/download?-csstransitions-touchevents-setclasses-dontmin
|
||||
*
|
||||
* Copyright (c)
|
||||
* Faruk Ates
|
||||
@@ -572,6 +572,23 @@ This test will also return `true` for Firefox 4 Multitouch support.
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* cssToDOM takes a kebab-case string and converts it to camelCase
|
||||
* e.g. box-sizing -> boxSizing
|
||||
*
|
||||
* @access private
|
||||
* @function cssToDOM
|
||||
* @param {string} name - String name of kebab-case prop we want to convert
|
||||
* @returns {string} The camelCase version of the supplied name
|
||||
*/
|
||||
|
||||
function cssToDOM(name) {
|
||||
return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
|
||||
return m1 + m2.toUpperCase();
|
||||
}).replace(/^-/, '');
|
||||
}
|
||||
;
|
||||
|
||||
/**
|
||||
* fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
|
||||
*
|
||||
@@ -629,23 +646,6 @@ This test will also return `true` for Firefox 4 Multitouch support.
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* cssToDOM takes a kebab-case string and converts it to camelCase
|
||||
* e.g. box-sizing -> boxSizing
|
||||
*
|
||||
* @access private
|
||||
* @function cssToDOM
|
||||
* @param {string} name - String name of kebab-case prop we want to convert
|
||||
* @returns {string} The camelCase version of the supplied name
|
||||
*/
|
||||
|
||||
function cssToDOM(name) {
|
||||
return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) {
|
||||
return m1 + m2.toUpperCase();
|
||||
}).replace(/^-/, '');
|
||||
}
|
||||
;
|
||||
|
||||
/**
|
||||
* Create our "modernizr" element that we do most feature tests on.
|
||||
*
|
||||
@@ -949,23 +949,14 @@ This test will also return `true` for Firefox 4 Multitouch support.
|
||||
|
||||
/*!
|
||||
{
|
||||
"name": "CSS Animations",
|
||||
"property": "cssanimations",
|
||||
"caniuse": "css-animation",
|
||||
"polyfills": ["transformie", "csssandpaper"],
|
||||
"tags": ["css"],
|
||||
"warnings": ["Android < 4 will pass this test, but can only animate a single property at a time"],
|
||||
"notes": [{
|
||||
"name" : "Article: 'Dispelling the Android CSS animation myths'",
|
||||
"href": "https://goo.gl/OGw5Gm"
|
||||
}]
|
||||
"name": "CSS Transitions",
|
||||
"property": "csstransitions",
|
||||
"caniuse": "css-transitions",
|
||||
"tags": ["css"]
|
||||
}
|
||||
!*/
|
||||
/* DOC
|
||||
Detects whether or not elements can be animated using CSS
|
||||
*/
|
||||
|
||||
Modernizr.addTest('cssanimations', testAllProps('animationName', 'a', true));
|
||||
Modernizr.addTest('csstransitions', testAllProps('transition', 'all', true));
|
||||
|
||||
|
||||
// Run each test
|
||||
|
||||
@@ -21,7 +21,7 @@ $(function() {
|
||||
$control_item.addClass('active');
|
||||
|
||||
window.on_transitionend($control_item_content, function(event) {
|
||||
if (!event || event.target === $control_item_content[0]) {
|
||||
if (!event || event.target === this) {
|
||||
$control_item_content.off(window.transitionend);
|
||||
$control_item_content.removeAttr('style');
|
||||
$control_item.removeClass('loading');
|
||||
@@ -40,7 +40,7 @@ $(function() {
|
||||
$control_item_content.height($control_item_content_main.outerHeight(true));
|
||||
|
||||
window.on_transitionend($control_item_content, function(event) {
|
||||
if (!event || event.target === $control_item_content[0]) {
|
||||
if (!event || event.target === this) {
|
||||
$control_item_content.off(window.transitionend);
|
||||
$control_item_content_main.html('');
|
||||
}
|
||||
|
||||
@@ -35,6 +35,13 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$body.on('click', '.slider__next', function(event) {
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
var $slider = $this.parents('.slider');
|
||||
slider_next_item($slider);
|
||||
});
|
||||
|
||||
window.enable_touch_swipe('.slider', slider_prev_item, slider_next_item);
|
||||
window.enable_touch_swipe('.text_slider', slider_prev_item, slider_next_item);
|
||||
});
|
||||
|
||||
@@ -135,38 +135,39 @@
|
||||
.form__field {
|
||||
width: 100%;
|
||||
display: block;
|
||||
margin-bottom: em(15px);
|
||||
margin-bottom: em(25px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form__field--label {
|
||||
padding-left: 30%;
|
||||
label {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 30%;
|
||||
line-height: em(40px);
|
||||
font-weight: 400;
|
||||
padding-right: em(20px);
|
||||
font-size: em(12px);
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
span {
|
||||
line-height: 1.3;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: $small_breakpoint) {
|
||||
padding: 0;
|
||||
label {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: em(2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form__field__label {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 30%;
|
||||
line-height: em(36px);
|
||||
font-weight: 400;
|
||||
padding-right: em(20px);
|
||||
font-size: em(12px);
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
span {
|
||||
line-height: 1.3;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@media screen and (max-width: $small_breakpoint) {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: em(2px);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +211,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
input[type="checkbox"], input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="email"], input[type="number"], input[type="password"],
|
||||
input[type="checkbox"] + label, input[type="radio"] + label,
|
||||
textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: em(45px);
|
||||
font-size: em(16px);
|
||||
@@ -224,6 +232,7 @@ input, textarea {
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
padding-right: em(5px);
|
||||
position: relative;
|
||||
&::placeholder {
|
||||
color: $gray;
|
||||
}
|
||||
@@ -245,12 +254,79 @@ input, textarea {
|
||||
}
|
||||
}
|
||||
|
||||
.form__field__choice__icon {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: em(14px);
|
||||
width: em(24px);
|
||||
height: em(24px);
|
||||
margin-top: em(-12px);
|
||||
border: 2px solid $gray;
|
||||
background: $white;
|
||||
will-change: transform;
|
||||
svg {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -20%;
|
||||
left: 15%;
|
||||
width: 120%;
|
||||
height: 120%;
|
||||
fill: $green;
|
||||
}
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: em(10px);
|
||||
height: em(10px);
|
||||
margin-top: em(-5px);
|
||||
margin-left: em(-5px);
|
||||
border-radius: 50%;
|
||||
background: $green;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"] + label, input[type="radio"] + label {
|
||||
padding: em(12px) em(14px) em(12px) em(52px);
|
||||
margin-bottom: em(10px);
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + label, input[type="radio"]:checked + label {
|
||||
.form__field__choice__icon {
|
||||
svg {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"] + label {
|
||||
.form__field__choice__icon {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"]:checked + label {
|
||||
.form__field__choice__icon {
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
&:before {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: em(150px);
|
||||
text-indent: 0;
|
||||
padding: em(12px) em(14px);
|
||||
resize: vertical;
|
||||
min-height: em(100px);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.form__field__help_text {
|
||||
|
||||
@@ -142,6 +142,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
.slider__next {
|
||||
color: $white;
|
||||
text-decoration: none;
|
||||
span {
|
||||
border-bottom: 1px solid rgba($white, 0.5);
|
||||
display: inline-block;
|
||||
}
|
||||
svg {
|
||||
height: em(18px);
|
||||
width: em(18px);
|
||||
transform: none;
|
||||
transition: transform 0.2s, opacity 0.2s;
|
||||
margin-left: em(5px);
|
||||
vertical-align: baseline;
|
||||
fill: $white;
|
||||
opacity: 0.5;
|
||||
position: relative;
|
||||
top: em(4px);
|
||||
}
|
||||
&:hover {
|
||||
svg {
|
||||
transform: translateX(em(5px));
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slider__images {
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
|
||||
193
src/portal/migrations/0001_initial.py
Normal file
193
src/portal/migrations/0001_initial.py
Normal file
@@ -0,0 +1,193 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.11 on 2018-03-22 16:10
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import cms.models.fields
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import image_cropping.fields
|
||||
import parler.models
|
||||
import project.utils
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
|
||||
('cms', '0018_pagenode'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('auth', '0008_alter_user_username_max_length'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='DownloadFile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ordering', models.IntegerField(default=50, verbose_name='Sortierung')),
|
||||
('groups', models.ManyToManyField(related_name='files', to='auth.Group', verbose_name='Mitgliedergruppen')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Download Files',
|
||||
'verbose_name': 'Download File',
|
||||
'ordering': ['ordering'],
|
||||
},
|
||||
bases=(parler.models.TranslatableModelMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DownloadFileTranslation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
|
||||
('name', models.CharField(blank=True, max_length=512, null=True, verbose_name='Name')),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Beschreibung')),
|
||||
('file', models.FileField(max_length=512, upload_to='protected_files')),
|
||||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadFile')),
|
||||
],
|
||||
options={
|
||||
'managed': True,
|
||||
'db_tablespace': '',
|
||||
'verbose_name': 'Download File Translation',
|
||||
'default_permissions': (),
|
||||
'db_table': 'portal_downloadfile_translation',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DownloadSection',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('ordering', models.IntegerField(default=50, verbose_name='Sortierung')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Download Sections',
|
||||
'verbose_name': 'Download Section',
|
||||
'ordering': ['ordering'],
|
||||
},
|
||||
bases=(parler.models.TranslatableModelMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DownloadSectionTranslation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
|
||||
('title', models.CharField(max_length=100, verbose_name='Title')),
|
||||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadSection')),
|
||||
],
|
||||
options={
|
||||
'managed': True,
|
||||
'db_tablespace': '',
|
||||
'verbose_name': 'Download Section Translation',
|
||||
'default_permissions': (),
|
||||
'db_table': 'portal_downloadsection_translation',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DownloadTag',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Download Tags',
|
||||
'verbose_name': 'Download Tag',
|
||||
},
|
||||
bases=(parler.models.TranslatableModelMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DownloadTagTranslation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
|
||||
('name', models.CharField(max_length=100, verbose_name='Name')),
|
||||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadTag')),
|
||||
],
|
||||
options={
|
||||
'managed': True,
|
||||
'db_tablespace': '',
|
||||
'verbose_name': 'Download Tag Translation',
|
||||
'default_permissions': (),
|
||||
'db_table': 'portal_downloadtag_translation',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Information',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('cropping', image_cropping.fields.ImageRatioField('image', '1200x800', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping')),
|
||||
('published', models.BooleanField(default=False, verbose_name='Veröffentlicht')),
|
||||
('publish_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Veröffentlichungsdatum')),
|
||||
('groups', models.ManyToManyField(related_name='tasks', to='auth.Group', verbose_name='Mitglieder Gruppe')),
|
||||
('image', project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
|
||||
('informed_users', models.ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL, verbose_name='Als gelesen markiert von:')),
|
||||
('placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, slotname='content', to='cms.Placeholder')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Mitglieder Aufgaben',
|
||||
'verbose_name': 'Mitglieder Aufgabe',
|
||||
'ordering': ['-publish_date'],
|
||||
},
|
||||
bases=(parler.models.TranslatableModelMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='InformationTranslation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
|
||||
('title', models.CharField(max_length=100, verbose_name='Title')),
|
||||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.Information')),
|
||||
],
|
||||
options={
|
||||
'managed': True,
|
||||
'db_tablespace': '',
|
||||
'verbose_name': 'Mitglieder Aufgabe Translation',
|
||||
'default_permissions': (),
|
||||
'db_table': 'portal_information_translation',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Profile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('first_name', models.CharField(max_length=255, verbose_name='Vorname')),
|
||||
('last_name', models.CharField(max_length=255, verbose_name='Nachname')),
|
||||
('street', models.CharField(blank=True, max_length=255, null=True, verbose_name='Strasse')),
|
||||
('zip', models.IntegerField(blank=True, null=True, verbose_name='PLZ')),
|
||||
('place', models.CharField(blank=True, max_length=255, null=True, verbose_name='Ort')),
|
||||
('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='E-Mail')),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'User Profile',
|
||||
'verbose_name': 'User Profil',
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='downloadfile',
|
||||
name='section',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='portal.DownloadSection', verbose_name='Download Section'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='downloadfile',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(blank=True, null=True, related_name='files', to='portal.DownloadTag', verbose_name='Suchbegriffe'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='informationtranslation',
|
||||
unique_together=set([('language_code', 'master')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='downloadtagtranslation',
|
||||
unique_together=set([('language_code', 'master')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='downloadsectiontranslation',
|
||||
unique_together=set([('language_code', 'master')]),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='downloadfiletranslation',
|
||||
unique_together=set([('language_code', 'master')]),
|
||||
),
|
||||
]
|
||||
@@ -194,7 +194,7 @@ plugin_pool.unregister_plugin(_FormPlugin)
|
||||
class FormPlugin(_FormPlugin):
|
||||
module = 'Content'
|
||||
name = 'Form'
|
||||
child_classes = ['TextField', 'TextAreaField', 'EmailField', 'SubmitButton']
|
||||
child_classes = ['TextField', 'TextAreaField', 'EmailField', 'RadioSelectField', 'MultipleSelectField', 'SubmitButton']
|
||||
|
||||
|
||||
class SocialMediaListItemInlineAdmin(admin.TabularInline):
|
||||
|
||||
24
src/project/migrations/0005_auto_20180322_1612.py
Normal file
24
src/project/migrations/0005_auto_20180322_1612.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.11 on 2018-03-22 16:12
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('project', '0004_auto_20180320_1351'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='partner',
|
||||
options={'verbose_name': 'Partner', 'verbose_name_plural': 'Partner'},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='slideritem',
|
||||
name='next_slide_text',
|
||||
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='Nächster Slide Text'),
|
||||
),
|
||||
]
|
||||
@@ -111,6 +111,7 @@ class SliderItem(CMSPlugin):
|
||||
qualifications = models.ManyToManyField(SliderItemQualification, verbose_name='Qualifikationen', blank=True,
|
||||
null=True)
|
||||
email = models.EmailField(verbose_name='E-Mail', blank=True, null=True)
|
||||
next_slide_text = models.CharField(verbose_name='Nächster Slide Text', max_length=255, blank=True, null=True)
|
||||
|
||||
class Meta(CMSPlugin.Meta):
|
||||
verbose_name = 'Slider Item'
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<a href="{% url 'portal:overview' %}" class="footer__login header__button header__button--light data_id_1">
|
||||
<a href="#" class="footer__login header__button header__button--light data_id_1">
|
||||
<span class="header__button__icon">
|
||||
{% include 'project/assets/arrow-right-long.svg' %}
|
||||
</span>
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
<div class="form__field{% if label %} form__field--label{% endif %}">
|
||||
{% if label %}
|
||||
<label for="{{ field.id_for_label }}"><span>{{ field.label }}</span></label>
|
||||
{% endif %}
|
||||
{{ field }}
|
||||
{% with field.field.widget.input_type as type %}
|
||||
<div class="form__field{% if label or type == 'checkbox' or type == 'radio' %} form__field--label{% endif %}">
|
||||
{% if label or type == 'checkbox' or type == 'radio' %}
|
||||
<label class="form__field__label" for="{{ field.id_for_label }}"><span>{{ field.label }}</span></label>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<p class="form__field__errors">
|
||||
{% for error in field.errors %}
|
||||
{{ error }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% if type == 'checkbox' or type == 'radio' %}
|
||||
{% for value, text in field.field.choices %}
|
||||
<input type="{{ type }}" value="{{ value }}" name="{{ field.name }}"
|
||||
id="{{ field.auto_id }}_{{ forloop.counter0 }}">
|
||||
<label for="{{ field.auto_id }}_{{ forloop.counter0 }}">
|
||||
<span class="form__field__choice__icon">
|
||||
{% include 'project/assets/tick.svg' %}
|
||||
</span>
|
||||
{{ text }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
|
||||
{% if field.help_text %}
|
||||
<p class="form__field__help_text">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if field.errors %}
|
||||
<p class="form__field__errors">
|
||||
{% for error in field.errors %}
|
||||
{{ error }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.help_text %}
|
||||
<p class="form__field__help_text">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
@@ -16,4 +16,12 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if instance.next_slide_text %}
|
||||
<p class="slider__text__item__text">
|
||||
<a class="slider__next" href="#">
|
||||
<span>{{ instance.next_slide_text }}</span>
|
||||
{% include 'project/assets/arrow-right.svg' %}
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,19 +1,5 @@
|
||||
{% load i18n aldryn_forms_tags %}
|
||||
|
||||
{% if field %}
|
||||
<div class="form__field reveal_self reveal reveal_animation">
|
||||
{% render_form_widget field class=instance.custom_classes %}
|
||||
|
||||
{% if field.errors %}
|
||||
<p class="form__field__errors">
|
||||
{% for error in field.errors %}
|
||||
{{ error }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.help_text %}
|
||||
<p class="form__field__help_text">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'project/includes/field.html' %}
|
||||
{% endif %}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
<form method="post" action="." id="{{ instance.id }}"
|
||||
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
|
||||
class="form {% if instance.custom_classes %}{{ instance.custom_classes }}{% endif %}">
|
||||
class="form {% if instance.custom_classes %}{{ instance.custom_classes }}{% endif %}
|
||||
{% if not form_success_url %}reveal_self reveal reveal_animation{% endif %}">
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
|
||||
Reference in New Issue
Block a user