Update infos and add data retention note
This commit is contained in:
parent
b013ce8281
commit
03307f8265
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("fallback", "0005_alter_teammember_id"),
|
("fallback", "0005_alter_teammember_id"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,13 +8,15 @@ class FeedbackForm(ModelForm):
|
||||||
model = Feedback
|
model = Feedback
|
||||||
fields = ("party", "next_year", "feedback_text")
|
fields = ("party", "next_year", "feedback_text")
|
||||||
labels = {
|
labels = {
|
||||||
"party": "Kommst du zum HelferInnen Fest?",
|
"party": "Kommst du zum Helfer*innen-Fest?",
|
||||||
"feedback_text": "Wie wars?",
|
"feedback_text": "Wie war's?",
|
||||||
"next_year": "Dürfen wir dich nächstes Jahr wieder kontaktieren?",
|
"next_year": "Dürfen wir dich nächstes Jahr wieder kontaktieren?",
|
||||||
}
|
}
|
||||||
help_texts = {
|
help_texts = {
|
||||||
"feedback_text": "Was hat dir gefallen? Was hat geklappt? Was können wir naechstes Jahr besser machen?",
|
"feedback_text": "Was hat dir gefallen? Was hat geklappt? Was können wir nächstes Jahr besser machen?",
|
||||||
|
"next_year": "Hiermit bestätigst du, dass wir deinen Namen und deine Telefonnummer für bis zu ein Jahr nach Abgabe deiner Einwilligung speichern dürfen.",
|
||||||
}
|
}
|
||||||
widgets = {
|
widgets = {
|
||||||
|
"feedback_text": forms.Textarea(attrs={"class": "textarea"}),
|
||||||
"party": forms.RadioSelect,
|
"party": forms.RadioSelect,
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -13,7 +13,6 @@ class Feedback(models.Model):
|
||||||
party = models.CharField(
|
party = models.CharField(
|
||||||
max_length=7,
|
max_length=7,
|
||||||
choices=PartyState.choices,
|
choices=PartyState.choices,
|
||||||
blank=False,
|
|
||||||
)
|
)
|
||||||
next_year = models.BooleanField()
|
next_year = models.BooleanField()
|
||||||
feedback_text = models.TextField(blank=True, default="")
|
feedback_text = models.TextField(blank=True, default="")
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
|
|
||||||
{% extends "helper_base.html" %}
|
{% extends "helper_base.html" %}
|
||||||
|
|
||||||
{% block title %}Danke :){% endblock %}
|
{% block title %}Danke :){% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
Randdaten:<br>
|
<div class="content">
|
||||||
|
<h3>Randdaten zum Helfer*innen-Fest</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Wo? Auf dem Festivalgelande</li>
|
<li><strong>Wo?</strong> Auf dem Festivalgelände</li>
|
||||||
<li>Wann? Samstag, 3.6. 16 Uhr</li>
|
<li><strong>Wann?</strong> Samstag, 3.6. um 17 Uhr</li>
|
||||||
<li>Was? Fleischfreies Grillen(Alle bringen was mit), Getränke gehen auf uns und Musik haben wir.</li>
|
<li><strong>Was?</strong> Fleischfreies Grillen (Alle bringen was mit), Getränke gehen auf uns und Musik haben wir.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div class="content">
|
||||||
|
Bitte teil uns hierüber mit, ob du kommst. Vergiss nicht, deine Angaben mit dem <strong>Speichern</strong>-Button unten abzuschicken.
|
||||||
|
</div>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
|
@ -19,6 +23,15 @@ Randdaten:<br>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<label class="checkbox" for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
<label class="checkbox" for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
{% elif field.widget_type == 'radioselect' %}
|
||||||
|
<label class="label">{{ field.label }}</label>
|
||||||
|
<div class="control">
|
||||||
|
{% for radio in field %}
|
||||||
|
{% if radio.choice_label|cut:"-" != "" %}
|
||||||
|
<label class="radio" id="{{ radio.id_for_label }}">{{ radio.tag }} {{ radio.choice_label }}</label>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<label class="label" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
<label class="label" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
|
|
@ -7,7 +7,11 @@ from django.contrib import messages
|
||||||
|
|
||||||
def feedback(request, token):
|
def feedback(request, token):
|
||||||
tk = get_object_or_404(LoginToken, pk=token)
|
tk = get_object_or_404(LoginToken, pk=token)
|
||||||
|
request.session["token"] = token
|
||||||
|
|
||||||
helper = tk.helper
|
helper = tk.helper
|
||||||
|
request.helper = helper
|
||||||
|
|
||||||
form = FeedbackForm()
|
form = FeedbackForm()
|
||||||
prev_data = Feedback.objects.filter(helper=helper).first()
|
prev_data = Feedback.objects.filter(helper=helper).first()
|
||||||
if prev_data:
|
if prev_data:
|
||||||
|
@ -24,11 +28,4 @@ def feedback(request, token):
|
||||||
"Deine Angaben wurden gespeichert.",
|
"Deine Angaben wurden gespeichert.",
|
||||||
)
|
)
|
||||||
|
|
||||||
return render(
|
return render(request, "feedback.html", {"form": form})
|
||||||
request,
|
|
||||||
"feedback.html",
|
|
||||||
{
|
|
||||||
"form": form,
|
|
||||||
"helper": helper,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue