Commit 8b73313f authored by Jérome Perrin's avatar Jérome Perrin

added missing form_render_PDFeForm



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9239 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab3d8fcc
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:replace="nothing"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<!--\n
Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.\n
Vincent Pelletier <vincent@nexedi.com>\n
Christophe Dumez <christophe@nexedi.com>\n
\n
This program is Free Software; you can redistribute it and/or\n
modify it under the terms of the GNU General Public License\n
as published by the Free Software Foundation; either version 2\n
of the License, or (at your option) any later version.\n
\n
This program is distributed in the hope that it will be useful,\n
but WITHOUT ANY WARRANTY; without even the implied warranty of\n
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n
GNU General Public License for more details.\n
\n
You should have received a copy of the GNU General Public License\n
along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<tal:block metal:use-macro="here/view_master/macros/master">\n
<tal:block metal:fill-slot="main">\n
<tal:block metal:define-macro="master">\n
\n
<tal:block tal:define="object_name form/title;\n
object_name python:object_name.replace(\' \',\'\');\n
portal_url here/portal_url;\n
object_name string:${object_name}">\n
<link href="my_css" rel="stylesheet" type="text/css" group="test"\n
tal:attributes="href string:${object_name}_css.css"/>\n
</tal:block>\n
<tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\', here);\n
groups python: form.get_groups();\n
object_name form/title;\n
object_name python:object_name.replace(\' \',\'\')">\n
\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
\n
<tal:block tal:repeat="pagenum python:range(len(groups))"\n
tal:attributes="class string:my_span">\n
\n
\n
<div\n
class="my_page_class"\n
tal:attributes="class string:page_${pagenum}"\n
><img src="test_object_page_0.png"\n
alt="background"\n
class="page_0_background"\n
tal:attributes="src string:${object_name}_background_${pagenum};\n
class string:page_${pagenum}_background"\n
/><span tal:replace="nothing" >\n
page is not empty (there is at least one element) \n
considering class = \'page_\' + pagenum\n
</span>\n
<span tal:repeat="field python:form.get_fields_in_group(groups[pagenum])"\n
class="my_span"\n
tal:omit-tag=""\n
><!--get a field-->\n
<span tal:condition="python:field.meta_type != \'HiddenStringField\'"\n
tal:define="name python:str(field.id);\n
value python:request.get(field.id,None);\n
class_base string:${name}"\n
class="my_span"\n
tal:omit-tag=""\n
><div tal:omit-tag=""\n
tal:define="struct python:field.render(value,request)"\n
><span tal:omit-tag=""\n
tal:define="struct python:struct.replace(\'&nbsp;;\',\'\');\n
struct_input_div python:struct.split(\'<input\');\n
struct_input_len python:len(struct_input_div);\n
struct_input_range python:range(struct_input_len);\n
struct_input_test python:int(struct_input_len) < 3;\n
struct_selec_div python:struct.split(\'<select\');\n
struct_selec_len python:len(struct_selec_div);\n
struct_selec_range python:range(struct_selec_len);\n
struct_selec_test python:int(struct_selec_len) == 1;\n
struct_test python:struct_selec_test and struct_input_test"\n
><span tal:replace="nothing">\n
- rendering final output string through \'field.render\'.\n
- replacing all \'&nbsp\' with \'\' to prevent error in rendering\n
- making two tests : first one (struct_input_test) is used to test if\n
rendering is single field (StringField, ) or multi-field\n
(DateTimeField, RelationStringField, ).\n
PLEASE note : CheckboxField is rendered as a single field in html_style\n
but as a multi-field in xhtml_style\n
Second one takes care of the RelationStrinField item when it is filled\n
as it is composed of 1 input field + 1 select field\n
</span>\n
<span tal:omit-tag=""\n
tal:condition="struct_test"\n
><!-- begining single field processing --><span tal:replace="nothing">\n
this bloc has been implemented to take care of the textarea\n
and single inputfield renderings. this just process the\n
output rendering as a single field.\n
UPDATE : with xhtml_style, this \n
</span>\n
<div tal:condition="python:(not field_errors.has_key(field.id))"\n
><!-- field has no error -->\n
<span tal:replace="structure struct"\n
tal:attributes="class string:${name}_class;\n
title field/title"\n
/></div>\n
<div tal:condition="python: field_errors.has_key(field.id)"\n
><!-- field has errors-->\n
<span tal:replace="structure struct"\n
tal:attributes="class string:${name}_class_error;\n
title string:${field/title}"\n
/></div>\n
<!-- end single field processing-->\n
</span>\n
<span tal:omit-tag=""\n
tal:condition="not:struct_input_test"\n
><!-- begining multi-input processing -->\n
<span tal:replace="nothing">\n
this bloc is designed to process standard multi-input fields such as\n
DateTimeFields and RelationStringFields. (and checkbox field in\n
xhtml_style).\n
As the rendering is based on several inputs, need to take each of them,\n
give them the good attributes (class) and then pasting the result string\n
in the document before processing the next input\n
</span>\n
<tal:block tal:condition="python: \'hidden\' not in struct_input_div[1]">\n
<span tal:define="struct_range python:range(struct_input_len)"\n
tal:repeat="struct_ind python:struct_range[1:]">\n
<div tal:condition="python:(not field_errors.has_key(field.id))"\n
><!-- field has no error 1-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
struct_final python:\'%s %s\' %\n
(\'<input \', struct_content);\n
class_final python:\'%s%s%s\' %\n
(class_base,\'_class_\', struct_ind)"\n
tal:replace="structure struct_final"\n
tal:attributes="class class_final;\n
title field/title"\n
/>\n
</div>\n
<div tal:condition="python:field_errors.has_key(field.id)"\n
><!-- field has errors 1-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
struct_final python:\'%s %s\' %\n
(\'<input \', struct_content);\n
class_final python:\'%s%s%s%s\' %\n
(class_base,\'_class_\', struct_ind, \'_error\')"\n
tal:replace="structure struct_final"\n
tal:attributes="class class_final;\n
title field/title"\n
/></div>\n
</span>\n
</tal:block>\n
<tal:block tal:condition="python: \'hidden\' in struct_input_div[1]">\n
<!-- processing CheckBoxField in xhtml_style -->\n
<span tal:define="struct_range python:range(struct_input_len)"\n
tal:repeat="struct_ind python:struct_range[1:]">\n
<div tal:condition="python:(not field_errors.has_key(field.id))"\n
><!-- field has no error 2-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
struct_final python:\'%s %s\' %\n
(\'<input \', struct_content);\n
class_final python:\'%s%s\' %\n
(class_base,\'_class\')"\n
tal:replace="structure struct_final"\n
tal:attributes="class class_final;\n
title field/title"\n
/>\n
</div>\n
<div tal:condition="python:field_errors.has_key(field.id)"\n
><!-- field has errors 2-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
struct_final python:\'%s %s\' %\n
(\'<input \', struct_content);\n
class_final python:\'%s%s\' %\n
(class_base,\'_class_error\')"\n
tal:replace="structure struct_final"\n
tal:attributes="class class_final;\n
title field/title"\n
/></div>\n
</span>\n
</tal:block>\n
</span>\n
<span tal:omit-tag=""\n
tal:condition="not:struct_selec_test"\n
><!-- start select-field rendering -->\n
<span tal:replace="nothing">\n
this bloc is here to process special multi-fields rendering based on\n
input + select (for RelationStringFields when user can select element\n
from a list object)\n
</span>\n
<span tal:omit-tag=""\n
tal:define="struct_content0 python:struct_selec_div[0];\n
struct_content1 python:struct_selec_div[1];\n
struct_content1 python:\'%s %s\' %\n
(\'<select\',struct_content1);\n
struct_selec_div python:[\'\',struct_content0, struct_content1];\n
struct_range python:range(struct_selec_len +1)"\n
tal:repeat="struct_ind python:struct_range[1:]"\n
><div\n
><!-- field has no errors-->\n
<span tal:condition="python:(not field_errors.has_key(field.id))"\n
tal:define="class_final python:\'%s%s%s\' %\n
(class_base,\'_class_\', struct_ind)"\n
tal:replace="structure python:struct_selec_div[struct_ind]"\n
tal:attributes="class class_final;\n
title field/title"\n
/><!-- field has no errors -->\n
<span tal:condition="python:field_errors.has_key(field.id)"\n
tal:define="class_final python:\'%s%s%s%s\' %\n
(class_base,\'_class_\', struct_ind, \'_error\')"\n
tal:replace="structure python:struct_selec_div[struct_ind]"\n
tal:attributes="class class_final;\n
title field/title"\n
/></div>\n
</span>\n
</span>\n
<span tal:omit-tag=""\n
tal:condition="python:field_errors.has_key(field.id)"\n
><!-- rendering error text -->\n
<span tal:replace="nothing">\n
once all the field have been rendered, just need to add error text\n
if necessary on the rigth side of the page.\n
</span>\n
<div tal:define="class_final python:\'%s%s\' %\n
(class_base, \'_error_display\')"\n
tal:content="python:field_errors[field.id].error_text"\n
i18n:translate=""\n
i18domain="ui"\n
tal:attributes="class class_final;\n
title string:${field/title}"\n
></div>\n
</span>\n
</span>\n
</div>\n
</span>\n
</span>\n
<br/>\n
<br/>\n
</div>\n
<span tal:replace="nothing">\n
this test is needed to add a content after the last page\n
displayed to be sure it is well displayed under Konqueror\n
(Mozilla does not have this kind of problem)\n
</span>\n
<div tal:condition="python:pagenum==(len(groups)-1)"\n
tal:attributes="class string:page_end"> \n
<b></b>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>form_render_PDFeForm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2006-08-16 jerome
* added missing form_render_PDFeForm
2006-08-03 jerome
* add global action
......
ERP5 PDF Editor provide support PDF editing with the combination of Scribus.
ERP5 PDF Editor provides support PDF editing with the combination of Scribus.
You need to have pdftoppm from xpdf, and convert from ImageMagick.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment