Commit 677ff55c authored by Vincent Pelletier's avatar Vincent Pelletier

Move specific form rendering for quad form inside quand_form_view, because it...

Move specific form rendering for quad form inside quand_form_view, because it used only here and it avoids one metal call.
Make dialog listbox display below the bordered dialog box.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8300 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dcb2d152
...@@ -77,38 +77,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -77,38 +77,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<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
<div class="dialog_box">\n <tal:block metal:define-slot="main" />\n
<tal:block tal:define="dialog_actions python: actions.get(dialog_category, [])">\n <tal:block metal:define-slot="bottom" />\n
<div tal:condition="python: len(dialog_actions) > 1"\n
class="dialog_selector">\n
<label for="dialog_selector"\n
tal:content="python: { \'object_exchange\': \'Select Exchange\'\n
, \'object_print\' : \'Select Print\'\n
, \'object_search\' : \'Select Search\'\n
, \'object_report\' : \'Select Report\'\n
}.get(dialog_category, \'Select\')"\n
i18n:translate="" i18n:domain="ui"></label>\n
<select name="dialog_select" id="dialog_selector"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doDialog\')">\n
<tal:block tal:repeat="action dialog_actions">\n
<option tal:attributes="value action/url;\n
selected python: action is current_action and \'selected\' or None"\n
tal:content="action/name"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\n
<button type="submit" name="Base_doDialog:method">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Go</span>\n
</button>\n
</div>\n
</tal:block>\n
<div class="content">\n
<tal:block metal:define-slot="main" />\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
</div>\n
</div>\n </div>\n
<button type="submit" name="Base_cancel:method">\n <button type="submit" name="Base_cancel:method">\n
<span class="image"></span>\n <span class="image"></span>\n
......
...@@ -756,6 +756,7 @@ div.index_html table {\n ...@@ -756,6 +756,7 @@ div.index_html table {\n
border-style: solid;\n border-style: solid;\n
border-color: <dtml-var dialog_border_color>;\n border-color: <dtml-var dialog_border_color>;\n
padding: 0.5em;\n padding: 0.5em;\n
margin-bottom: 1em;\n
}\n }\n
\n \n
.list_dialog {\n .list_dialog {\n
......
...@@ -75,7 +75,84 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -75,7 +75,84 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:define-macro="master">\n <tal:block metal:define-macro="master">\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 metal:use-macro="here/form_render/macros/master" />\n <tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\', here);\n
left_group python: form.get_fields_in_group(\'left\');\n
right_group python: form.get_fields_in_group(\'right\');\n
center_group python: form.get_fields_in_group(\'center\');\n
dialog_actions python: actions.get(dialog_category, [])">\n
<div tal:condition="python: len(left_group) or len(right_group) or len(center_group) or len(dialog_actions)>1"\n
class="dialog_box">\n
<div tal:condition="python: len(dialog_actions) > 1"\n
class="dialog_selector">\n
<label for="dialog_selector"\n
tal:content="python: { \'object_exchange\': \'Select Exchange\'\n
, \'object_print\' : \'Select Print\'\n
, \'object_search\' : \'Select Search\'\n
, \'object_report\' : \'Select Report\'\n
}.get(dialog_category, \'Select\')"\n
i18n:translate="" i18n:domain="ui"></label>\n
<select name="dialog_select" id="dialog_selector"\n
tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doDialog\')">\n
<tal:block tal:repeat="action dialog_actions">\n
<option tal:attributes="value action/url;\n
selected python: action is current_action and \'selected\' or None"\n
tal:content="action/name"\n
i18n:translate="" i18n:domain="ui"></option>\n
</tal:block>\n
</select>\n
<button type="submit" name="Base_doDialog:method">\n
<span class="image"></span>\n
<span class="description"\n
i18n:translate="" i18n:domain="ui">Go</span>\n
</button>\n
</div>\n
<div class="content">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\n
class="left">\n
<tal:block tal:repeat="field left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<div tal:condition="python: len(right_group) > 0"\n
class="right">\n
<tal:block tal:repeat="field right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
<div tal:condition="python: len(center_group) > 0"\n
class="center">\n
<tal:block tal:repeat="field center_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
</div>\n
</tal:block>\n
</tal:block>\n
<tal:block metal:fill-slot="bottom">\n
<tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\', here);\n
bottom_group python: form.get_fields_in_group(\'bottom\')">\n
<div tal:condition="python: len(bottom_group) > 0"\n
class="bottom">\n
<tal:block tal:repeat="field bottom_group">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/field" />\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
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
......
...@@ -135,57 +135,6 @@ Groups names becomes "left_group", "right_group", "left1_group", "right1_group", ...@@ -135,57 +135,6 @@ Groups names becomes "left_group", "right_group", "left1_group", "right1_group",
</tal:block>\n </tal:block>\n
</div>\n </div>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
<tal:block metal:define-macro="quad_form">\n
<tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\', here);\n
left_group python: form.get_fields_in_group(\'left\');\n
right_group python: form.get_fields_in_group(\'right\');\n
center_left_group python: form.get_fields_in_group(\'center_left\');\n
center_right_group python: form.get_fields_in_group(\'center_right\');\n
bottom_group python: form.get_fields_in_group(\'bottom\');">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\n
class="left">\n
<tal:block tal:repeat="field left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<div tal:condition="python: len(right_group) > 0"\n
class="right">\n
<tal:block tal:repeat="field right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
<div tal:condition="python: len(center_left_group) > 0 or len(center_right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(center_left_group) > 0"\n
class="left">\n
<tal:block tal:repeat="field center_left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<div tal:condition="python: len(center_right_group) > 0"\n
class="right">\n
<tal:block tal:repeat="field center_right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
<div tal:condition="python: len(bottom_group) > 0"\n
class="bottom">\n
<tal:block tal:repeat="field python: form.get_fields_in_group(\'bottom\')">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
</tal:block>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
......
...@@ -74,7 +74,55 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -74,7 +74,55 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</tal:block>\n </tal:block>\n
<tal:block metal:use-macro="here/view_main/macros/master">\n <tal:block metal:use-macro="here/view_main/macros/master">\n
<tal:block metal:fill-slot="main">\n <tal:block metal:fill-slot="main">\n
<tal:block metal:use-macro="here/form_render/macros/quad_form" />\n <tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\', here);\n
left_group python: form.get_fields_in_group(\'left\');\n
right_group python: form.get_fields_in_group(\'right\');\n
center_left_group python: form.get_fields_in_group(\'center_left\');\n
center_right_group python: form.get_fields_in_group(\'center_right\');\n
bottom_group python: form.get_fields_in_group(\'bottom\');">\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n
<div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\n
class="left">\n
<tal:block tal:repeat="field left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<div tal:condition="python: len(right_group) > 0"\n
class="right">\n
<tal:block tal:repeat="field right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
<div tal:condition="python: len(center_left_group) > 0 or len(center_right_group) > 0"\n
class="top_group">\n
<div tal:condition="python: len(center_left_group) > 0"\n
class="left">\n
<tal:block tal:repeat="field center_left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<div tal:condition="python: len(center_right_group) > 0"\n
class="right">\n
<tal:block tal:repeat="field center_right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
<h6 class="clear">&nbsp;</h6>\n
</div>\n
<div tal:condition="python: len(bottom_group) > 0"\n
class="bottom">\n
<tal:block tal:repeat="field python: form.get_fields_in_group(\'bottom\')">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n
</div>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>
......
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