forked from TagesschuleElementa/www.tagesschule-elementa.ch
fixes
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user