diff options
Diffstat (limited to 'archaeological_files_pdl/views.py')
-rw-r--r-- | archaeological_files_pdl/views.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/archaeological_files_pdl/views.py b/archaeological_files_pdl/views.py index a319954b9..bcb1c0211 100644 --- a/archaeological_files_pdl/views.py +++ b/archaeological_files_pdl/views.py @@ -19,7 +19,7 @@ from django.utils.translation import ugettext_lazy as _ -from archaeological_files_pdl.wizards import FileWizard +from archaeological_files_pdl.wizards import FileWizard, FileModificationWizard from archaeological_operations.wizards import is_preventive, is_not_preventive from ishtar_common.views import OrganizationPersonCreate, OrganizationPersonEdit @@ -60,6 +60,38 @@ file_creation_wizard = FileWizard.as_view([ }, url_name='file_creation',) +file_modification_wizard_is_preventive = is_preventive('general-file_modification', + models.FileType, type_key='file_type') +file_modification_wizard_is_not_preventive = is_not_preventive( + 'general-file_modification', models.FileType, type_key='file_type') +file_modification_wizard = FileModificationWizard.as_view([ + ('selec-file_modification', ref_forms.FileFormSelection), + + ('general-file_modification', forms.FileFormGeneral), + ('preventivetype-file_modification', forms.FileFormPreventiveType), + ('preventiveplanning-file_modification', forms.FileFormPlanning), + ('researchaddress-file_modification', forms.FileFormResearchAddress), + ('parcelspdl-file_modification', ParcelFormSet), + ('generalcontractor-file_modification', + forms.FileFormGeneralContractor), + ('planningservice-file_modification', + forms.FileFormPlanningService), + ('research-file_modification', ref_forms.FileFormResearch), + ('instruction-file_modification', + forms.FileFormInstruction), + ('final-file_modification', ref_forms.FinalForm)], + label=_(u"File modification"), + condition_dict={ + 'preventivetype-file_modification':file_modification_wizard_is_preventive, + 'preventiveplanning-file_modification':file_modification_wizard_is_preventive, + 'generalcontractor-file_modification':file_modification_wizard_is_preventive, + 'planningservice-file_modification':file_modification_wizard_is_preventive, + 'researchaddress-file_modification':file_modification_wizard_is_not_preventive, + 'research-file_modification':file_modification_wizard_is_not_preventive + }, + url_name='file_modification',) + + class TownPlanningEdit(OrganizationPersonEdit): relative_label = _("File followed by") |