Commit b80f45d5 authored by Kevin Deldycke's avatar Kevin Deldycke

In editable mode, enclose main content in a div to act as a fieldgroup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8123 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 25df71a0
......@@ -77,18 +77,23 @@ 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
\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
default_layout string:view_master;\n
layout_id layout_form/pt | default_layout;">\n
layout_id layout_form/pt | default_layout;">\n
\n
\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<tal:block metal:define-macro="form_render">\n
\n
<tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)"\n
dummy python: request.set(\'here\',here)"\n
tal:condition="python: layout_form_id and not ignore_layout">\n
\n
<tal:block tal:condition="not: editable_mode" tal:repeat="group python: form.get_groups()">\n
<div tal:attributes="class group/lower" tal:condition="python: group.find(\'content\') >= 0">\n
<tal:block tal:condition="python: \'hidden\' not in group.lower()" tal:repeat="field python:form.get_fields_in_group(group)">\n
......@@ -96,22 +101,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</tal:block>\n
</div>\n
</tal:block>\n
<tal:block tal:condition="editable_mode" tal:repeat="group python: form.get_groups()">\n
<fieldset tal:condition="python: \'hidden\' not in group.lower()">\n
<legend tal:content="group"></legend>\n
<table tal:condition="python: \'content\' not in group.lower() and \'bottom\' not in group.lower()">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n
<tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
\n
<div class="fieldgroup" tal:condition="editable_mode">\n
<tal:block tal:repeat="group python: form.get_groups()">\n
<fieldset tal:condition="python: \'hidden\' not in group.lower()">\n
<legend tal:content="group"/>\n
<table tal:condition="python: \'content\' not in group.lower() and \'bottom\' not in group.lower()">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n
<tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
</tal:block>\n
</table>\n
<tal:block tal:condition="python: \'content\' in group.lower() or \'bottom\' in group.lower()"\n
tal:repeat="field python:form.get_fields_in_group(group)">\n
<tal:block tal:define="value python:request.get(field.id, None)"\n
tal:replace="structure python:field.render(value, request)"/>\n
</tal:block>\n
</table>\n
<tal:block tal:condition="python: \'content\' in group.lower() or \'bottom\' in group.lower()"\n
tal:repeat="field python:form.get_fields_in_group(group)">\n
<tal:block tal:define="value python:request.get(field.id, None)"\n
tal:replace="structure python:field.render(value, request)" />\n
</tal:block>\n
</fieldset>\n
</tal:block>\n
</fieldset>\n
</tal:block>\n
</div>\n
\n
</tal:block>\n
\n
<tal:block tal:condition="python: not layout_form_id or ignore_layout">\n
<tal:block metal:define-macro="form_layout">\n
<div class="Main" tal:define="field_errors python: request.get(\'field_errors\',{});\n
......@@ -161,9 +171,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</div>\n
</tal:block>\n
</tal:block>\n
\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
</tal:block>
]]></string> </value>
......
......@@ -78,15 +78,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</tal:block>\n
\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
default_layout string:view_master;\n
layout_id layout_form/pt | default_layout;">\n
layout_id layout_form/pt | default_layout;">\n
\n
<tal:block metal:use-macro="python: getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Main">\n
<div tal:attributes="class python: editable_mode and \'fieldgroup\' or \'Main\'">\n
<tal:block tal:define="groups python: form.get_groups(include_empty=1);\n
field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)">\n
......
2006-06-21 Kevin
* In editable mode, enclose main content in a div to act as a fieldgroup.
2006-06-15 Thomas
* Added support for PlanningBox : including scripts to generate data, and page template to display XHTML.
......
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