Browse Source

some more fancy help texts

master
Benni Baermann 4 years ago
parent
commit
7b5802e6ea
4 changed files with 59 additions and 1 deletions
  1. +28
    -0
      input/migrations/0049_auto_20201118_1509.py
  2. +28
    -0
      input/migrations/0050_auto_20201118_1512.py
  3. +2
    -1
      input/models.py
  4. +1
    -0
      input/views.py

+ 28
- 0
input/migrations/0049_auto_20201118_1509.py 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'),
),
]

+ 28
- 0
input/migrations/0050_auto_20201118_1512.py 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'),
),
]

+ 2
- 1
input/models.py 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

+ 1
- 0
input/views.py 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)

Loading…
Cancel
Save