Commit 7a6bfd98 authored by Fabien Morin's avatar Fabien Morin

- remove the no-existing markup group in a link markup

- replace all SPAN markups using DIV markups because they were not well used : a lot of DIV were inside SPAN markup, wich is not XHTML valid and makes somethoing like 15 errors more for each pdf page.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19342 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a30c6d53
......@@ -85,7 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
portal_url here/portal_url;\n
object_name string:${object_name};\n
dummy python:request.set(\'editable_mode\', 1)">\n
<link href="my_css" rel="stylesheet" type="text/css" group="test"\n
<link href="my_css" rel="stylesheet" type="text/css"\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
......@@ -108,14 +108,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:attributes="src string:${object_name}_background_${pagenum};\n
class python:\'page_%s_background %s\' % \n
(pagenum, test(pagenum == 0,\'first_page\', \'other_page\'))"/>\n
<span tal:replace="nothing" >\n
<div 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
</div>\n
<div tal:repeat="field python:form.get_fields_in_group(groups[pagenum])"\n
class="my_span"\n
tal:omit-tag=""><!--get a field-->\n
<span tal:condition="python:field.meta_type != \'HiddenStringField\'"\n
<div 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
......@@ -123,7 +123,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:omit-tag="">\n
<div tal:omit-tag=""\n
tal:define="struct python:field.render(value,request)">\n
<span tal:omit-tag=""\n
<div 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
......@@ -134,7 +134,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\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
<div 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
......@@ -144,43 +144,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\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
</div>\n
<div tal:omit-tag="" \n
tal:condition="struct_test"><!-- begining single field processing -->\n
<span tal:replace="nothing">\n
<div 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>\n
<div tal:condition="python:(not field_errors.has_key(field.id))"><!-- field has no error -->\n
<span tal:replace="structure struct"\n
<div 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)"><!-- field has errors-->\n
<span tal:replace="structure struct"\n
<div tal:replace="structure struct"\n
i18n:attributes="title"\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
</div>\n
<div tal:omit-tag=""\n
tal:condition="not:struct_input_test"><!-- begining multi-input processing -->\n
<span tal:replace="nothing">\n
<div 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
</div>\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
<div 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))"><!-- field has no error 1-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
<div 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
......@@ -190,7 +190,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
title field/title"/>\n
</div>\n
<div tal:condition="python:field_errors.has_key(field.id)"><!-- field has errors 1-->\n
<span tal:define="struct_content python:struct_input_div[struct_ind];\n
<div 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
......@@ -200,15 +200,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:attributes="class class_final;\n
title field/title"/>\n
</div>\n
</span>\n
</div>\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
<div 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
<div 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
......@@ -219,7 +219,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\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
<div 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
......@@ -228,18 +228,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:attributes="class class_final;\n
title field/title"/>\n
</div>\n
</span>\n
</div>\n
</tal:block>\n
</span>\n
<span tal:omit-tag=""\n
</div>\n
<div tal:omit-tag=""\n
tal:condition="not:struct_selec_test">\n
<!-- start select-field rendering -->\n
<span tal:replace="nothing">\n
<div 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
</div>\n
<div 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
......@@ -248,29 +248,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
struct_range python:range(struct_selec_len +1)"\n
tal:repeat="struct_ind python:struct_range[1:]">\n
<div><!-- field has no errors-->\n
<span tal:condition="python:(not field_errors.has_key(field.id))"\n
<div 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
<div 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
</div>\n
</div>\n
<div tal:omit-tag=""\n
tal:condition="python:field_errors.has_key(field.id)">\n
<!-- rendering error text -->\n
<span tal:replace="nothing">\n
<div 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>\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
......@@ -279,23 +279,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:attributes="class class_final;\n
title string:${field/title}">\n
</div>\n
</span>\n
</span>\n
</div>\n
</div>\n
\n
\n
\n
</div>\n
</span>\n
</span>\n
</div>\n
</div>\n
\n
<br/>\n
<br/>\n
</div>\n
<span tal:replace="nothing">\n
<div 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>\n
<div tal:condition="python:pagenum==(len(groups)-1)"\n
tal:attributes="class string:page_end"> \n
<b></b>\n
......
16
\ No newline at end of file
17
\ No newline at end of file
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