summaryrefslogtreecommitdiff
path: root/archaeological_operations/views.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2014-01-06 12:05:38 +0100
committerÉtienne Loks <etienne.loks@peacefrogs.net>2014-01-06 12:05:38 +0100
commitb73eb18bbda41ada60e90d5d06bac5871ee557f7 (patch)
tree09a7db8f49c2feeb1e28cbca275f5b5f95257075 /archaeological_operations/views.py
parentfe717a2c052734a435b6c3418c465a48e331a5e9 (diff)
downloadIshtar-b73eb18bbda41ada60e90d5d06bac5871ee557f7.tar.bz2
Ishtar-b73eb18bbda41ada60e90d5d06bac5871ee557f7.zip
Fix bad administrativ act for files (refs #1589)
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r--archaeological_operations/views.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 0c4609181..233c45d19 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -330,10 +330,13 @@ def generatedoc_administrativeactop(request, pk, template_pk=None):
return HttpResponse(mimetype='text/plain')
def administrativeactfile_document(request, operation=True):
+ search_form = AdministrativeActOpeFormSelection
+ if not operation:
+ from archaeological_files.forms import AdministrativeActFileFormSelection
+ search_form = AdministrativeActFileFormSelection
dct = {}
if request.POST:
- dct['search_form'] = AdministrativeActOperationFormSelection(
- request.POST)
+ dct['search_form'] = search_form(request.POST)
dct['template_form'] = DocumentGenerationAdminActForm(request.POST,
operation=operation)
if dct['search_form'].is_valid() and dct['template_form'].is_valid():
@@ -341,7 +344,7 @@ def administrativeactfile_document(request, operation=True):
dct['search_form'].cleaned_data.get('pk'),
dct['template_form'].cleaned_data.get('document_template'))
else:
- dct['search_form'] = AdministrativeActOpeFormSelection()
+ dct['search_form'] = search_form()
dct['template_form'] = DocumentGenerationAdminActForm(
operation=operation)
return render_to_response('ishtar/administrativeact_document.html', dct,