From 3580bfe1619059b0525bff114f0ecc8500ef140a Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 18 Nov 2020 16:03:27 +0100 Subject: [PATCH] some changes in help texts --- input/migrations/0048_auto_20201118_1503.py | 28 +++++++++++++++++++++ input/models.py | 3 ++- input/views.py | 6 +++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 input/migrations/0048_auto_20201118_1503.py diff --git a/input/migrations/0048_auto_20201118_1503.py b/input/migrations/0048_auto_20201118_1503.py new file mode 100644 index 0000000..1a3cafd --- /dev/null +++ b/input/migrations/0048_auto_20201118_1503.py @@ -0,0 +1,28 @@ +# Generated by Django 3.1.1 on 2020-11-18 15:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('input', '0047_auto_20201117_1546'), + ] + + operations = [ + migrations.AlterField( + model_name='ifg', + name='cost', + field=models.CharField(help_text='Bitte gib die ungefähr zu erwartenden Kosten in Euro an.', max_length=10, verbose_name='Kosten'), + ), + migrations.AlterField( + model_name='library', + name='cost', + field=models.CharField(help_text='Bitte gib die ungefähr zu erwartenden Kosten in Euro an.', max_length=10, verbose_name='Kosten'), + ), + migrations.AlterField( + model_name='literature', + name='cost', + field=models.CharField(help_text='Bitte gib die ungefähr zu erwartenden Kosten in Euro an.', max_length=10, verbose_name='Kosten'), + ), + ] diff --git a/input/models.py b/input/models.py index 307b644..5a816d6 100644 --- a/input/models.py +++ b/input/models.py @@ -121,7 +121,8 @@ class Travel(Intern): #abstract base class for Library and IFG class Grant(Extern): - cost = models.CharField(max_length=10, verbose_name='Kosten') + cost = models.CharField(max_length=10, verbose_name='Kosten', + help_text="Bitte gib die ungefähr zu erwartenden Kosten in Euro an.") notes = models.CharField(max_length=500, blank=True, verbose_name='Anmerkungen') class Meta: diff --git a/input/views.py b/input/views.py index fcc008f..2633411 100644 --- a/input/views.py +++ b/input/views.py @@ -121,6 +121,11 @@ LABEL_CHOICES = {'BIB': format_html('Bibliothek'), 'VIS': format_html('Visitenkarten'), } +HELP_CHOICES = {'BIB': format_html("In welchem Zeitraum möchtest du recherchieren oder
wie lange ist der Bibliotheksausweis gültig?"), + 'ELIT': "Wie lange gilt der Zugang?", + 'SOFT': "Wie lange gilt die Lizenz?", + } + class ExternView(CookieWizardView): '''This View is for Volunteers''' @@ -144,6 +149,7 @@ class ExternView(CookieWizardView): elif choice in ('BIB', 'SOFT', 'ELIT'): form = LibraryForm(data) form.fields['library'].label = LABEL_CHOICES[choice] + form.fields['duration'].help_text = HELP_CHOICES[choice] elif choice == 'MAIL': form = EmailForm(data) elif choice == 'LIT':