Added title to print

This commit is contained in:
David Taylor
2015-08-09 23:53:38 +03:00
committed by Tom Price
parent 09dc2a3eb4
commit 5862646314
2 changed files with 6 additions and 12 deletions

View File

@@ -141,7 +141,6 @@ class FormPrint(generic.TemplateView):
}
return template.render(context)
def _render_boolean(self, field, value, current_indent):
template = get_template('rigForms/print/render-boolean.xml')
context = {
@@ -176,7 +175,6 @@ class FormPrint(generic.TemplateView):
return result
def _render_field(self, parentField, parentValue, current_indent):
result = ""
for (key,field) in parentField.items():
@@ -213,7 +211,8 @@ class FormPrint(generic.TemplateView):
'bold': 'RIGS/static/fonts/OPENSANS-BOLD.TTF',
}
},
'formData':formData
'formData':formData,
'form':form
})
rml = template.render(context)
@@ -228,6 +227,4 @@ class FormPrint(generic.TemplateView):
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = "filename=Form.pdf"
response.write(pdfData)
return response
return response