mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-08 07:59:42 +00:00
Added title to print
This commit is contained in:
@@ -1,17 +1,14 @@
|
|||||||
<setNextFrame name="main"/>
|
<setNextFrame name="main"/>
|
||||||
<nextFrame/>
|
<nextFrame/>
|
||||||
|
|
||||||
|
<h1><b>{{ form.schema.schema_type.name }}</b><small></small></h1>
|
||||||
{% autoescape off %}
|
<spacer length="10"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% autoescape off %}
|
||||||
|
|
||||||
{{ formData }}
|
{{ formData }}
|
||||||
|
|
||||||
|
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<namedString id="lastPage"><pageNumber/></namedString>
|
<namedString id="lastPage"><pageNumber/></namedString>
|
||||||
@@ -141,7 +141,6 @@ class FormPrint(generic.TemplateView):
|
|||||||
}
|
}
|
||||||
return template.render(context)
|
return template.render(context)
|
||||||
|
|
||||||
|
|
||||||
def _render_boolean(self, field, value, current_indent):
|
def _render_boolean(self, field, value, current_indent):
|
||||||
template = get_template('rigForms/print/render-boolean.xml')
|
template = get_template('rigForms/print/render-boolean.xml')
|
||||||
context = {
|
context = {
|
||||||
@@ -176,7 +175,6 @@ class FormPrint(generic.TemplateView):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def _render_field(self, parentField, parentValue, current_indent):
|
def _render_field(self, parentField, parentValue, current_indent):
|
||||||
result = ""
|
result = ""
|
||||||
for (key,field) in parentField.items():
|
for (key,field) in parentField.items():
|
||||||
@@ -213,7 +211,8 @@ class FormPrint(generic.TemplateView):
|
|||||||
'bold': 'RIGS/static/fonts/OPENSANS-BOLD.TTF',
|
'bold': 'RIGS/static/fonts/OPENSANS-BOLD.TTF',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'formData':formData
|
'formData':formData,
|
||||||
|
'form':form
|
||||||
})
|
})
|
||||||
|
|
||||||
rml = template.render(context)
|
rml = template.render(context)
|
||||||
@@ -228,6 +227,4 @@ class FormPrint(generic.TemplateView):
|
|||||||
response = HttpResponse(content_type='application/pdf')
|
response = HttpResponse(content_type='application/pdf')
|
||||||
response['Content-Disposition'] = "filename=Form.pdf"
|
response['Content-Disposition'] = "filename=Form.pdf"
|
||||||
response.write(pdfData)
|
response.write(pdfData)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user