diff options
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 |
commit | 58568e150d54f4715d4bc91bf0ebefa772a39682 (patch) | |
tree | 45d5fe6bcd60fe66954db08976a649bfa9203747 /archaeological_operations/forms.py | |
parent | 4bf634a003ab6c3d9edf1cc7fa40e7203d59711f (diff) | |
download | Ishtar-58568e150d54f4715d4bc91bf0ebefa772a39682.tar.bz2 Ishtar-58568e150d54f4715d4bc91bf0ebefa772a39682.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.py | 15 |
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?") |