changes in /intern

This commit is contained in:
Benni Bärmann 2020-11-19 11:26:39 +01:00
parent c5f98a529b
commit 886140d771
1 changed files with 10 additions and 0 deletions

View File

@ -83,10 +83,20 @@ class InternView(LoginRequiredMixin, CookieWizardView):
form = TravelForm(data)
raise RuntimeError(f'ERROR! UNKNOWN FORMTYPE {choice} in InternView')
self.choice = choice
form = super().get_form(step, data, files)
form.fields['realname'].help_text = format_html("Vor- und Zuname (Realname), Wer hat das Projekt beantragt?<br>\
Wer ist Hauptansprechperson? Bei WMDE-MAs immer (WMDE),<br>\
bei externen Partnern (PART) hinzufügen.")
return form
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
if hasattr(self, 'choice'):
context["choice"] = INTERN_CHOICES[self.choice]
return context
def done(self, form_list, **kwargs):
print('InternView.done() reached')
# gather data from all forms