Commit 17f69549 authored by Jean-Paul Smets's avatar Jean-Paul Smets

better support of editable mode in form_dialog (make sure the environment...

better support of editable mode in form_dialog (make sure the environment knows immediately that we moved to editable mode)
allow layout_form_id to be passed in the request so that a page template can select the layout it wished to be rendered in (this is useful to create a front page of web site with very different layout from the rest of the site)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15464 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6a674d5
...@@ -78,7 +78,9 @@ along with this program; if not, write to the Free Software\n ...@@ -78,7 +78,9 @@ 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 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n -->\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master"\n
tal:define="editable_mode python: True;\n
dummy python: request.set(\'editable_mode\', editable_mode)">\n
<tal:block metal:use-macro="here/dialog_main/macros/master">\n <tal:block metal:use-macro="here/dialog_main/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n <tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
...@@ -87,9 +89,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -87,9 +89,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
right_group python: form.get_fields_in_group(\'right\');\n right_group python: form.get_fields_in_group(\'right\');\n
center_group python: form.get_fields_in_group(\'center\');\n center_group python: form.get_fields_in_group(\'center\');\n
dialog_actions python: actions.get(dialog_category, []);\n dialog_actions python: actions.get(dialog_category, []);\n
field_render here/field_render/macros/field_render;\n field_render here/field_render/macros/field_render;">\n
editable_mode python: True;\n
dummy python: request.set(\'editable_mode\', editable_mode)">\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n <tal:block tal:condition="preferred_html_style_developper_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/form" />\n <tal:block metal:use-macro="developper_shortcut_render/macros/form" />\n
</tal:block>\n </tal:block>\n
......
...@@ -84,7 +84,7 @@ IDEAS:\n ...@@ -84,7 +84,7 @@ IDEAS:\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\n
<tal:block\n <tal:block\n
tal:define="ignore_layout request/ignore_layout | nothing;\n tal:define="ignore_layout request/ignore_layout | nothing;\n
layout_form_id here/getApplicableLayout | nothing;\n layout_form_id request/layout_form_id | here/getApplicableLayout | nothing;\n
layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n layout_form python: layout_form_id and getattr(here, layout_form_id, None) or None;\n
is_web_mode python: (layout_form is not None) and (not ignore_layout);\n is_web_mode python: (layout_form is not None) and (not ignore_layout);\n
editable_mode python: (not is_web_mode) or request.get(\'editable_mode\', False);\n editable_mode python: (not is_web_mode) or request.get(\'editable_mode\', False);\n
......
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