Commit ff83ef08 authored by Jérome Perrin's avatar Jérome Perrin

Refer field groups by their name, not their index in the list for fields, like...

Refer field groups by their name, not their index in the list for fields, like in xhtml style (not html style).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15726 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d52a1da4
...@@ -59,13 +59,10 @@ ...@@ -59,13 +59,10 @@
<subject>Print Example</subject>\n <subject>Print Example</subject>\n
<content>\n <content>\n
<tal:block metal:define-macro="form_layout"\n <tal:block metal:define-macro="form_layout"\n
tal:define="groups python: form.get_groups(include_empty=1);\n tal:define="dummy python: request.set(\'here\',here);\n
field_errors python: request.get(\'field_errors\',{});\n listbox form/listbox | nothing;">\n
dummy python: request.set(\'here\',here);\n
listbox python:form.get_fields_in_group(groups[0])[0];">\n
\n \n
\n <tal:block tal:condition="listbox">\n
<tal:block tal:condition="python: listbox.meta_type == \'ListBox\'">\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n <div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n </tal:block>\n
\n \n
......
...@@ -65,15 +65,12 @@ ...@@ -65,15 +65,12 @@
<subject>Print Example</subject>\n <subject>Print Example</subject>\n
<content>\n <content>\n
<tal:block metal:define-macro="form_layout"\n <tal:block metal:define-macro="form_layout"\n
tal:define="group_list python: form.get_groups(include_empty=1);\n tal:define="dummy python: request.set(\'here\',here); ">\n
field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here); ">\n
\n \n
\n \n
<tal:block tal:repeat="group python: group_list[:3]">\n <tal:block tal:repeat="group python: [\'Default\', \'left\', \'right\', \'center\']">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n <tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n <tal:block tal:condition="field_list">\n
\n
<table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n <table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n <tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
...@@ -115,36 +112,25 @@ ...@@ -115,36 +112,25 @@
\n \n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n
\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:condition="python: len(group_list) > 3">\n <tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group_list[3])">\n <tal:block tal:repeat="field field_list">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n
<tal:block tal:repeat="field field_list">\n
\n \n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n <tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n
<tal:block tal:define="matrixbox python:field;">\n <tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n <div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n \n
\n <tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n
\n <tal:block tal:define="listbox python:field;" >\n
<tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n <div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
\n
<tal:block tal:define="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n
\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
\n
</tal:block>\n </tal:block>\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n \n
\n \n
</tal:block>\n </tal:block>\n
......
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
\n \n
<spacer height="100" tal:condition="form/get_fields"/>\n <spacer height="100" tal:condition="form/get_fields"/>\n
\n \n
<tal:block tal:repeat="group python: group_list[:3]">\n <tal:block tal:repeat="group python: [\'Default\', \'left\', \'right\', \'center\']">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n <tal:block tal:define="field_list python: form.get_fields_in_group(group)">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n <tal:block tal:condition="field_list">\n
\n \n
<table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n <table splitbyrow="1" repeatrows="0" repeatcols="0" style="AttributesTable" >\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
...@@ -110,36 +110,28 @@ ...@@ -110,36 +110,28 @@
\n \n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n
\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:condition="python: len(group_list) > 3">\n <tal:block tal:define="field_list python: form.get_fields_in_group(\'bottom\')">\n
<tal:block tal:define="field_list python: form.get_fields_in_group(group_list[3])">\n <tal:block tal:condition="field_list">\n
<tal:block tal:condition="python: field_list not in [None, []]">\n
<tal:block tal:repeat="field field_list">\n <tal:block tal:repeat="field field_list">\n
\n \n
<tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n <tal:block tal:condition="python: field.meta_type == \'MatrixBox\'">\n
<tal:block tal:define="matrixbox python:field;">\n <tal:block tal:define="matrixbox python:field;">\n
<div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n <div metal:use-macro="here/matrixbox_pdf_macro/macros/matrixbox" />\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n
\n
\n \n
<tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n <tal:block tal:condition="python: field.meta_type == \'ListBox\'">\n
\n
<tal:block tal:define="listbox python:field;" >\n <tal:block tal:define="listbox python:field;" >\n
<div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n <div metal:use-macro="here/listbox_pdf_macro/macros/listbox" />\n
</tal:block>\n </tal:block>\n
\n
<table><tr><td tal:content="python: \' \'"></td></tr></table>\n <table><tr><td tal:content="python: \' \'"></td></tr></table>\n
\n \n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n \n
\n \n
<spacer height="100"/>\n <spacer height="100"/>\n
......
36 38
\ No newline at end of file \ 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