diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-13 13:23:35 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-04-13 13:23:35 +0200 |
commit | abdd99265410d6a163c8b0f74dcba0f6f0664f70 (patch) | |
tree | 71d968e3d0b0571b4c1d1bef036774f30e98dbcf /archaeological_operations/views.py | |
parent | da7803b9cc920cad30d0c19bb503f2360bcc8dc3 (diff) | |
download | Ishtar-abdd99265410d6a163c8b0f74dcba0f6f0664f70.tar.bz2 Ishtar-abdd99265410d6a163c8b0f74dcba0f6f0664f70.zip |
New type of operation: court-ordered seizure with associated fields (refs #4048)
* models
* migrations
* wizard panel
* forms
* sheet
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 61c9e6c19..fcd6c3252 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -44,13 +44,14 @@ from archaeological_operations.forms import ArchaeologicalSiteForm, \ AdministrativeActOpeFormSelection, AdministrativeActOpeForm, \ AdministrativeActOpeModifForm, FinalAdministrativeActDeleteForm, \ AdministrativeActRegisterFormSelection, DocumentGenerationAdminActForm, \ - SiteForm, SiteTownFormset, SiteUnderwaterForm, check_underwater_module + SiteForm, SiteTownFormset, SiteUnderwaterForm, check_underwater_module, \ + CourtOrderedSeizureForm from ishtar_common.views import get_item, show_item, revert_item, new_item from ishtar_common.wizards import SearchWizard, check_rights_condition from archaeological_operations.wizards import has_associated_file, \ - is_preventive, OperationWizard, OperationModificationWizard, \ + is_preventive, is_judiciary, OperationWizard, OperationModificationWizard, \ OperationClosingWizard, OperationDeletionWizard, SiteSearch, \ OperationSourceWizard, OperationSourceDeletionWizard, \ OperationAdministrativeActWizard, OperationEditAdministrativeActWizard, \ @@ -192,6 +193,7 @@ operation_search_wizard = SearchWizard.as_view( wizard_steps = [ ('filechoice-operation_creation', OperationFormFileChoice), ('general-operation_creation', OperationFormGeneral), + ('judiciary-operation_creation', CourtOrderedSeizureForm), ('collaborators-operation_creation', CollaboratorForm), ('archaeologicalsite-operation_creation', ArchaeologicalSiteFormSet), ('preventive-operation_creation', OperationFormPreventive), @@ -223,6 +225,9 @@ check_files_for_operation = get_check_files_for_operation() ope_crea_condition_dict = { 'filechoice-operation_creation': check_files_for_operation, + 'judiciary-operation_creation': is_judiciary( + 'general-operation_creation', models.OperationType, 'operation_type', + ), 'preventive-operation_creation': get_check_files_for_operation( is_preventive('general-operation_creation', models.OperationType, @@ -250,6 +255,7 @@ operation_creation_wizard = OperationWizard.as_view( operation_modif_wizard_steps = [ ('selec-operation_modification', OperationFormSelection), ('general-operation_modification', OperationFormModifGeneral), + ('judiciary-operation_modification', CourtOrderedSeizureForm), ('collaborators-operation_modification', CollaboratorForm), ('archaeologicalsite-operation_modification', ArchaeologicalSiteFormSet), ('preventive-operation_modification', OperationFormPreventive), @@ -275,6 +281,9 @@ ope_modif_condition_dict = { get_check_files_for_operation( is_preventive('general-operation_modification', models.OperationType, 'operation_type', 'arch_diagnostic')), + 'judiciary-operation_modification': is_judiciary( + 'general-operation_modification', models.OperationType, 'operation_type', + ), 'townsgeneral-operation_modification': has_associated_file( 'general-operation_modification', negate=True), 'towns-operation_modification': has_associated_file( |