|
@ -11,6 +11,7 @@ from django.template.loader import get_template |
|
|
from django.template import Context |
|
|
from django.template import Context |
|
|
from django.contrib.auth.decorators import login_required |
|
|
from django.contrib.auth.decorators import login_required |
|
|
from django.contrib.auth.mixins import LoginRequiredMixin |
|
|
from django.contrib.auth.mixins import LoginRequiredMixin |
|
|
|
|
|
from django.utils.html import format_html |
|
|
|
|
|
|
|
|
from .forms import ProjectForm, ExternForm, LibraryForm, IFGForm, LiteratureForm,\ |
|
|
from .forms import ProjectForm, ExternForm, LibraryForm, IFGForm, LiteratureForm,\ |
|
|
HonoraryCertificateForm, InternForm, TravelForm, EmailForm,\ |
|
|
HonoraryCertificateForm, InternForm, TravelForm, EmailForm,\ |
|
@ -108,6 +109,17 @@ class InternView(LoginRequiredMixin, CookieWizardView): |
|
|
|
|
|
|
|
|
return done(self.request) |
|
|
return done(self.request) |
|
|
|
|
|
|
|
|
|
|
|
# these where used as labels in the second form TYPE_CHOICES is used for the first form and the |
|
|
|
|
|
# text above the second form. only used for BIB, SOFT, ELIT in the moment |
|
|
|
|
|
LABEL_CHOICES = {'BIB': format_html('Bibliothek'), |
|
|
|
|
|
'ELIT': format_html('Datenbank/Online-Ressource'), |
|
|
|
|
|
'MAIL': format_html('E-Mail-Adresse'), |
|
|
|
|
|
'IFG': format_html('Kostenübernahme IFG-Anfrage'), |
|
|
|
|
|
'LIT': format_html('Literaturstipendium'), |
|
|
|
|
|
'LIST': format_html('Mailingliste'), |
|
|
|
|
|
'SOFT': format_html('Software'), |
|
|
|
|
|
'VIS': format_html('Visitenkarten'), |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
class ExternView(CookieWizardView): |
|
|
class ExternView(CookieWizardView): |
|
|
'''This View is for Volunteers''' |
|
|
'''This View is for Volunteers''' |
|
@ -131,7 +143,7 @@ class ExternView(CookieWizardView): |
|
|
form = IFGForm(data) |
|
|
form = IFGForm(data) |
|
|
elif choice in ('BIB', 'SOFT', 'ELIT'): |
|
|
elif choice in ('BIB', 'SOFT', 'ELIT'): |
|
|
form = LibraryForm(data) |
|
|
form = LibraryForm(data) |
|
|
form.fields['library'].label = TYPE_CHOICES[choice] |
|
|
|
|
|
|
|
|
form.fields['library'].label = LABEL_CHOICES[choice] |
|
|
elif choice == 'MAIL': |
|
|
elif choice == 'MAIL': |
|
|
form = EmailForm(data) |
|
|
form = EmailForm(data) |
|
|
elif choice == 'LIT': |
|
|
elif choice == 'LIT': |
|
|