Browse Source

some changes in help texts

master
Benni Baermann 4 years ago
parent
commit
3580bfe161
3 changed files with 36 additions and 1 deletions
  1. +28
    -0
      input/migrations/0048_auto_20201118_1503.py
  2. +2
    -1
      input/models.py
  3. +6
    -0
      input/views.py

+ 28
- 0
input/migrations/0048_auto_20201118_1503.py View File

@ -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'),
),
]

+ 2
- 1
input/models.py View File

@ -121,7 +121,8 @@ class Travel(Intern):
#abstract base class for Library and IFG #abstract base class for Library and IFG
class Grant(Extern): 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') notes = models.CharField(max_length=500, blank=True, verbose_name='Anmerkungen')
class Meta: class Meta:

+ 6
- 0
input/views.py View File

@ -121,6 +121,11 @@ LABEL_CHOICES = {'BIB': format_html('Bibliothek'),
'VIS': format_html('Visitenkarten'), 'VIS': format_html('Visitenkarten'),
} }
HELP_CHOICES = {'BIB': format_html("In welchem Zeitraum möchtest du recherchieren oder<br>wie lange ist der Bibliotheksausweis gültig?"),
'ELIT': "Wie lange gilt der Zugang?",
'SOFT': "Wie lange gilt die Lizenz?",
}
class ExternView(CookieWizardView): class ExternView(CookieWizardView):
'''This View is for Volunteers''' '''This View is for Volunteers'''
@ -144,6 +149,7 @@ class ExternView(CookieWizardView):
elif choice in ('BIB', 'SOFT', 'ELIT'): elif choice in ('BIB', 'SOFT', 'ELIT'):
form = LibraryForm(data) form = LibraryForm(data)
form.fields['library'].label = LABEL_CHOICES[choice] form.fields['library'].label = LABEL_CHOICES[choice]
form.fields['duration'].help_text = HELP_CHOICES[choice]
elif choice == 'MAIL': elif choice == 'MAIL':
form = EmailForm(data) form = EmailForm(data)
elif choice == 'LIT': elif choice == 'LIT':

Loading…
Cancel
Save