summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-10-21 19:24:56 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-10-21 19:24:56 +0200
commit661180e434f94afdec0a6ee86b5c1aa1a7aa354f (patch)
tree45d5fe6bcd60fe66954db08976a649bfa9203747 /archaeological_operations/forms.py
parent92c84e043c6e788190980883265e50ed8a1fa5a1 (diff)
downloadIshtar-661180e434f94afdec0a6ee86b5c1aa1a7aa354f.tar.bz2
Ishtar-661180e434f94afdec0a6ee86b5c1aa1a7aa354f.zip
Djangoization - Major refactoring (step 10)
* Fix operation wizards * Minor fix on other wizards
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index dc342f477..95d2d5275 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -337,21 +337,6 @@ PeriodFormset = formset_factory(PeriodForm, can_delete=True,
formset=PeriodFormSet)
PeriodFormset.form_label = _("Periods")
-def has_associated_file(form_name, file_key='associated_file', negate=False):
- def func(self, request, storage):
- if storage.prefix not in request.session or \
- 'step_data' not in request.session[storage.prefix] or \
- form_name not in request.session[storage.prefix]['step_data'] or\
- form_name + '-' + file_key not in \
- request.session[storage.prefix]['step_data'][form_name]:
- return negate
- try:
- file_id = int(request.session[storage.prefix]['step_data']\
- [form_name][form_name+'-'+file_key])
- return not negate
- except ValueError:
- return negate
- return func
class FinalOperationClosingForm(FinalForm):
confirm_msg = " "
confirm_end_msg = _(u"Would you like to close this operation?")