diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-04 15:03:04 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-07-04 15:03:04 +0200 |
commit | 131a0ff3b009a879ebc0119396b8ee5e8e38a807 (patch) | |
tree | d0a09ef3861b093b055c73b9cad30f8bf2be5b06 /archaeological_operations/views.py | |
parent | 415c9e56882b1ab78afed0376ce643dc079ea0b8 (diff) | |
download | Ishtar-131a0ff3b009a879ebc0119396b8ee5e8e38a807.tar.bz2 Ishtar-131a0ff3b009a879ebc0119396b8ee5e8e38a807.zip |
Test wizard
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 14160266b..90f71abfe 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -253,27 +253,29 @@ def check_files_for_operation(self): return False return get_current_profile().files +ope_crea_condition_dict = { + 'filechoice-operation_creation': + check_files_for_operation, + 'preventive-operation_creation': + is_preventive('general-operation_creation', models.OperationType, + 'operation_type', 'prev_excavation'), + 'preventivediag-operation_creation': + is_preventive('general-operation_creation', models.OperationType, + 'operation_type', 'arch_diagnostic'), + 'townsgeneral-operation_creation': has_associated_file( + 'filechoice-operation_creation', negate=True), + 'towns-operation_creation': has_associated_file( + 'filechoice-operation_creation'), + 'parcelsgeneral-operation_creation': has_associated_file( + 'filechoice-operation_creation', negate=True), + 'parcels-operation_creation': has_associated_file( + 'filechoice-operation_creation'), +} + operation_creation_wizard = OperationWizard.as_view( wizard_steps, label=_(u"New operation"), - condition_dict={ - 'filechoice-operation_creation': - check_files_for_operation, - 'preventive-operation_creation': - is_preventive('general-operation_creation', models.OperationType, - 'operation_type', 'prev_excavation'), - 'preventivediag-operation_creation': - is_preventive('general-operation_creation', models.OperationType, - 'operation_type', 'arch_diagnostic'), - 'townsgeneral-operation_creation': has_associated_file( - 'filechoice-operation_creation', negate=True), - 'towns-operation_creation': has_associated_file( - 'filechoice-operation_creation'), - 'parcelsgeneral-operation_creation': has_associated_file( - 'filechoice-operation_creation', negate=True), - 'parcels-operation_creation': has_associated_file( - 'filechoice-operation_creation'), - }, + condition_dict=ope_crea_condition_dict, url_name='operation_creation',) operation_modification_wizard = OperationModificationWizard.as_view([ |