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):
|
||||
|
||||
dependencies = [
|
||||
("fallback", "0005_alter_teammember_id"),
|
||||
]
|
||||
|
|
|
@ -8,13 +8,15 @@ class FeedbackForm(ModelForm):
|
|||
model = Feedback
|
||||
fields = ("party", "next_year", "feedback_text")
|
||||
labels = {
|
||||
"party": "Kommst du zum HelferInnen Fest?",
|
||||
"feedback_text": "Wie wars?",
|
||||
"party": "Kommst du zum Helfer*innen-Fest?",
|
||||
"feedback_text": "Wie war's?",
|
||||
"next_year": "Dürfen wir dich nächstes Jahr wieder kontaktieren?",
|
||||
}
|
||||
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 = {
|
||||
"feedback_text": forms.Textarea(attrs={"class": "textarea"}),
|
||||
"party": forms.RadioSelect,
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
|
|
|
@ -13,7 +13,6 @@ class Feedback(models.Model):
|
|||
party = models.CharField(
|
||||
max_length=7,
|
||||
choices=PartyState.choices,
|
||||
blank=False,
|
||||
)
|
||||
next_year = models.BooleanField()
|
||||
feedback_text = models.TextField(blank=True, default="")
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
|
||||
{% extends "helper_base.html" %}
|
||||
|
||||
{% block title %}Danke :){% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Randdaten:<br>
|
||||
<ul>
|
||||
<li>Wo? Auf dem Festivalgelande</li>
|
||||
<li>Wann? Samstag, 3.6. 16 Uhr</li>
|
||||
<li>Was? Fleischfreies Grillen(Alle bringen was mit), Getränke gehen auf uns und Musik haben wir.</li>
|
||||
</ul>
|
||||
<div class="content">
|
||||
<h3>Randdaten zum Helfer*innen-Fest</h3>
|
||||
<ul>
|
||||
<li><strong>Wo?</strong> Auf dem Festivalgelände</li>
|
||||
<li><strong>Wann?</strong> Samstag, 3.6. um 17 Uhr</li>
|
||||
<li><strong>Was?</strong> Fleischfreies Grillen (Alle bringen was mit), Getränke gehen auf uns und Musik haben wir.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
|
@ -19,6 +23,15 @@ Randdaten:<br>
|
|||
<div class="control">
|
||||
<label class="checkbox" for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
||||
</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 %}
|
||||
<label class="label" for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
<div class="control">
|
||||
|
|
|
@ -7,7 +7,11 @@ from django.contrib import messages
|
|||
|
||||
def feedback(request, token):
|
||||
tk = get_object_or_404(LoginToken, pk=token)
|
||||
request.session["token"] = token
|
||||
|
||||
helper = tk.helper
|
||||
request.helper = helper
|
||||
|
||||
form = FeedbackForm()
|
||||
prev_data = Feedback.objects.filter(helper=helper).first()
|
||||
if prev_data:
|
||||
|
@ -24,11 +28,4 @@ def feedback(request, token):
|
|||
"Deine Angaben wurden gespeichert.",
|
||||
)
|
||||
|
||||
return render(
|
||||
request,
|
||||
"feedback.html",
|
||||
{
|
||||
"form": form,
|
||||
"helper": helper,
|
||||
},
|
||||
)
|
||||
return render(request, "feedback.html", {"form": form})
|
||||
|
|
Loading…
Reference in New Issue