diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-30 16:59:44 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-05-06 15:38:32 +0200 |
commit | fea9c2d83c910d890ee1600545a61d88e9df6851 (patch) | |
tree | 52e8f0c1333377628b60f0feefad64861980519f /archaeological_files_pdl/wizards.py | |
parent | fa7d0e715228ccec391f6cc87b69abd50f442ef9 (diff) | |
download | Ishtar-fea9c2d83c910d890ee1600545a61d88e9df6851.tar.bz2 Ishtar-fea9c2d83c910d890ee1600545a61d88e9df6851.zip |
Work on new town field (with state and department) - work on new UI for files
Diffstat (limited to 'archaeological_files_pdl/wizards.py')
-rw-r--r-- | archaeological_files_pdl/wizards.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/archaeological_files_pdl/wizards.py b/archaeological_files_pdl/wizards.py index 4abe5f0d5..6f688d7ca 100644 --- a/archaeological_files_pdl/wizards.py +++ b/archaeological_files_pdl/wizards.py @@ -25,12 +25,23 @@ class FileWizard(BaseFileWizard): town_input_id = 'main_town' multi_towns = False wizard_templates = { - 'generalcontractor-file_creation':\ - 'ishtar/wizard/wizard_generalcontractor.html',} + 'generalcontractor-%(url_name)s':\ + 'ishtar/wizard/wizard_generalcontractor.html', + 'instruction-%(url_name)s':\ + 'ishtar/wizard/wizard_instruction.html', + 'preventiveplanning-%(url_name)s':\ + 'ishtar/wizard/wizard_preventiveplanning.html', + } + + def get_current_year(self): + general_form_key = 'general-' + self.url_name + return self.session_get_value(general_form_key, 'year') def get_form_kwargs(self, *args, **kwargs): returned = super(FileWizard, self).get_form_kwargs(*args, **kwargs) - if args and args[0].startswith('generalcontractor-file_creation'): + if args and args[0].startswith('generalcontractor-'): if 'status' in self.request.GET: returned['status'] = self.request.GET['status'] + if args and args[0].startswith('instruction-'): + returned['year'] = self.get_current_year() return returned |