mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Added title to print
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
<setNextFrame name="main"/>
|
||||
<nextFrame/>
|
||||
|
||||
|
||||
{% autoescape off %}
|
||||
|
||||
<h1><b>{{ form.schema.schema_type.name }}</b><small></small></h1>
|
||||
<spacer length="10"/>
|
||||
|
||||
|
||||
{% autoescape off %}
|
||||
|
||||
{{ formData }}
|
||||
|
||||
|
||||
{% endautoescape %}
|
||||
|
||||
|
||||
|
||||
<namedString id="lastPage"><pageNumber/></namedString>
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user