changes in /intern

This commit is contained in:
Benni Baermann 2020-11-19 11:26:39 +01:00
parent c5f98a529b
commit 886140d771

View file

@ -83,10 +83,20 @@ class InternView(LoginRequiredMixin, CookieWizardView):
form = TravelForm(data) form = TravelForm(data)
else: else:
raise RuntimeError(f'ERROR! UNKNOWN FORMTYPE {choice} in InternView') raise RuntimeError(f'ERROR! UNKNOWN FORMTYPE {choice} in InternView')
self.choice = choice
else: else:
form = super().get_form(step, data, files) 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 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): def done(self, form_list, **kwargs):
print('InternView.done() reached') print('InternView.done() reached')
# gather data from all forms # gather data from all forms