|
|
@ -34,12 +34,24 @@ class ExternView(CookieWizardView): |
|
|
|
template_name = "input/extern.html" |
|
|
|
form_list = [VolunteerForm, LibraryForm] |
|
|
|
|
|
|
|
def process_step(self, form): |
|
|
|
if form.cleaned_data.get('choice') == 'IFG': |
|
|
|
print ('IFG detected!') |
|
|
|
self.form_list = [VolunteerForm, IFGForm] |
|
|
|
print('leaving process_step()') |
|
|
|
return self.get_form_step_data(form) |
|
|
|
# def process_step(self, form): |
|
|
|
# if form.cleaned_data.get('choice') == 'IFG': |
|
|
|
# print ('IFG detected!') |
|
|
|
# self.form_list = [VolunteerForm, IFGForm] |
|
|
|
# print('leaving process_step()') |
|
|
|
# return self.get_form_step_data(form) |
|
|
|
|
|
|
|
def get_form(self, step=None, data=None, files=None): |
|
|
|
if step: |
|
|
|
print ("get_form() step " + step) |
|
|
|
if step == '1': |
|
|
|
print('iiiooopppp') |
|
|
|
data = self.get_cleaned_data_for_step('0') |
|
|
|
print (data) |
|
|
|
if data.get('choice') == 'IFG': |
|
|
|
print ('IFG detected!') |
|
|
|
form = super().get_form(step, data, files) |
|
|
|
return form |
|
|
|
|
|
|
|
def done(self, form_list, **kwargs): |
|
|
|
print('ExternView.done() reached') |
|
|
|