some more fancy help texts

This commit is contained in:
Benni Baermann 2020-11-18 16:16:05 +01:00
parent 3580bfe161
commit 7b5802e6ea
4 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1,28 @@
# Generated by Django 3.1.1 on 2020-11-18 15:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0048_auto_20201118_1503'),
]
operations = [
migrations.AlterField(
model_name='ifg',
name='notes',
field=models.TextField(blank=True, max_length=500, verbose_name='Anmerkungen'),
),
migrations.AlterField(
model_name='library',
name='notes',
field=models.TextField(blank=True, max_length=500, verbose_name='Anmerkungen'),
),
migrations.AlterField(
model_name='literature',
name='notes',
field=models.TextField(blank=True, max_length=500, verbose_name='Anmerkungen'),
),
]

View file

@ -0,0 +1,28 @@
# Generated by Django 3.1.1 on 2020-11-18 15:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0049_auto_20201118_1509'),
]
operations = [
migrations.AlterField(
model_name='ifg',
name='notes',
field=models.TextField(blank=True, help_text='Bitte gib an wofür Du das Stipendium verwenden willst.', max_length=500, verbose_name='Anmerkungen'),
),
migrations.AlterField(
model_name='library',
name='notes',
field=models.TextField(blank=True, help_text='Bitte gib an wofür Du das Stipendium verwenden willst.', max_length=500, verbose_name='Anmerkungen'),
),
migrations.AlterField(
model_name='literature',
name='notes',
field=models.TextField(blank=True, help_text='Bitte gib an wofür Du das Stipendium verwenden willst.', max_length=500, verbose_name='Anmerkungen'),
),
]

View file

@ -123,7 +123,8 @@ class Travel(Intern):
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.") 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.TextField(max_length=500, blank=True, verbose_name='Anmerkungen',
help_text="Bitte gib an wofür Du das Stipendium verwenden willst.")
class Meta: class Meta:
abstract = True abstract = True

View file

@ -149,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['library'].help_text = f"Für welche {LABEL_CHOICES[choice]} gilt das Stipendium?"
form.fields['duration'].help_text = HELP_CHOICES[choice] form.fields['duration'].help_text = HELP_CHOICES[choice]
elif choice == 'MAIL': elif choice == 'MAIL':
form = EmailForm(data) form = EmailForm(data)