Commit 6ae1931b authored by Rafael Monnerat's avatar Rafael Monnerat

Added a 'head' group to dialogs so that we can put some text at the head of...

Added a 'head' group to dialogs so that we can put some text at the head of the dialog (ie. before dialog fields)  (change requested by JPS)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28283 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e249c294
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<tal:block metal:use-macro="here/main_template/macros/master">\n <tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<div class="list_dialog">\n <div class="list_dialog">\n
<tal:block metal:define-slot="head" />\n
<tal:block metal:define-slot="main" />\n <tal:block metal:define-slot="main" />\n
<tal:block metal:define-slot="bottom" />\n <tal:block metal:define-slot="bottom" />\n
</div>\n </div>\n
...@@ -74,8 +75,7 @@ ...@@ -74,8 +75,7 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -47,6 +47,29 @@ ...@@ -47,6 +47,29 @@
dialog_mode python: True;\n dialog_mode python: True;\n
dummy python: request.set(\'editable_mode\', editable_mode)">\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
\n
<tal:block metal:define-macro="head">\n
<tal:block metal:fill-slot="head">\n
<tal:block tal:define="dummy python: request.set(\'here\', here);\n
head_group python: form.get_fields_in_group(\'head\')">\n
<div tal:condition="python: len(head_group) > 0"\n
class="head">\n
<tal:block tal:repeat="field head_group">\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />\n
</tal:block>\n
<tal:block tal:define="field_description field/Field_getDescription"\n
tal:condition="preferred_html_style_translator_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/field_translator" />\n
</tal:block>\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
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block tal:define="dummy python: request.set(\'here\', here);\n <tal:block tal:define="dummy python: request.set(\'here\', here);\n
dialog_actions python: here.Base_fixDialogActions(actions, dialog_category);\n dialog_actions python: here.Base_fixDialogActions(actions, dialog_category);\n
...@@ -89,7 +112,7 @@ ...@@ -89,7 +112,7 @@
tal:define="group_list form/Form_getGroupTitleAndId">\n tal:define="group_list form/Form_getGroupTitleAndId">\n
<tal:block tal:repeat="group group_list">\n <tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid">\n <tal:block tal:define="gid group/gid">\n
<fieldset tal:condition="python: \'hidden\' not in gid and \'bottom\' not in gid"\n <fieldset tal:condition="python: \'hidden\' not in gid and \'bottom\' not in gid and \'head\' not in gid"\n
tal:attributes="class gid;\n tal:attributes="class gid;\n
id python: \'fieldset_\' + gid.replace(\' \', \'_\');">\n id python: \'fieldset_\' + gid.replace(\' \', \'_\');">\n
<legend tal:content="group/gtitle" class="group_title" />\n <legend tal:content="group/gtitle" class="group_title" />\n
...@@ -107,8 +130,8 @@ ...@@ -107,8 +130,8 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block metal:define-macro="bottom">\n <tal:block metal:define-macro="bottom">\n
<tal:block metal:fill-slot="bottom">\n <tal:block metal:fill-slot="bottom">\n
<tal:block tal:define="dummy python: request.set(\'here\', here);\n <tal:block tal:define="dummy python: request.set(\'here\', here);\n
bottom_group python: form.get_fields_in_group(\'bottom\')">\n bottom_group python: form.get_fields_in_group(\'bottom\')">\n
<div tal:condition="python: len(bottom_group) > 0"\n <div tal:condition="python: len(bottom_group) > 0"\n
...@@ -128,10 +151,10 @@ ...@@ -128,10 +151,10 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>
]]></string> </value> ]]></string> </value>
</item> </item>
......
792 793
\ 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