Browse Source

help texts for Mailinglists and EMail Form

master
Benni Baermann 4 years ago
parent
commit
32da9ccd16
2 changed files with 8 additions and 2 deletions
  1. +6
    -2
      input/models.py
  2. +2
    -0
      input/views.py

+ 6
- 2
input/models.py View File

@ -185,11 +185,15 @@ MAIL_CHOICES = {'REALNAME': 'Vorname.Nachname',
class Email(Domain): class Email(Domain):
address = models.CharField(max_length=50, address = models.CharField(max_length=50,
choices=MAIL_CHOICES.items(), choices=MAIL_CHOICES.items(),
default='USERNAME', verbose_name='Adressbestandteil')
default='USERNAME', verbose_name='Adressbestandteil',
help_text="Bitte gib hier den gewünschten Adressbestandteil an, der sich vor der Domain befinden soll.")
other = models.CharField(max_length=50,blank=True,null=True) other = models.CharField(max_length=50,blank=True,null=True)
class List(Domain): class List(Domain):
address = models.CharField(max_length=50, default='NO_ADDRESS')
address = models.CharField(max_length=50, default='NO_ADDRESS',
verbose_name="Adressbestandteil für Projektmailingliste",
help_text=format_html("Bitte gib hier den gewünschten Adressbestandteil an,<br>der sich vor der Domain befinden soll."))
PROJECT_CHOICE = {'PEDIA': 'Wikipedia', PROJECT_CHOICE = {'PEDIA': 'Wikipedia',
'SOURCE': 'Wikisource', 'SOURCE': 'Wikisource',

+ 2
- 0
input/views.py View File

@ -153,12 +153,14 @@ class ExternView(CookieWizardView):
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)
form.fields['domain'].help_text = format_html("Mit welcher Domain, bzw. für welches Wikimedia-Projekt,<br>möchtest du eine Mailadresse beantragen?")
elif choice == 'LIT': elif choice == 'LIT':
form = LiteratureForm(data) form = LiteratureForm(data)
elif choice == 'VIS': elif choice == 'VIS':
form = BusinessCardForm(data) form = BusinessCardForm(data)
elif choice == 'LIST': elif choice == 'LIST':
form = ListForm(data) form = ListForm(data)
form.fields['domain'].help_text = format_html("Mit welcher Domain, bzw. für welches Wikimedia-Projekt,<br>möchtest du eine Mailingliste beantragen?")
else: else:
raise RuntimeError(f'ERROR! UNKNOWN FORMTYPE {choice} in ExternView') raise RuntimeError(f'ERROR! UNKNOWN FORMTYPE {choice} in ExternView')
self.choice = choice self.choice = choice

Loading…
Cancel
Save