From 992f7f57ea2e19dc03d2496a3308acff23d8c7f5 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Mon, 16 Oct 2006 12:21:23 +0000
Subject: [PATCH] Fix list dialogs: selection_name and index must be generated
 for this kind of dialog.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10740 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../list_dialog_master.xml                    |  2 +-
 .../erp5_xhtml_style/list_dialog.xml          | 90 +++++++++++++++++++
 .../bootstrap/erp5_xhtml_style/bt/revision    |  2 +-
 3 files changed, 92 insertions(+), 2 deletions(-)
 create mode 100644 product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_dialog.xml

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/list_dialog_master.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/list_dialog_master.xml
index 1959cf3a41..d77d5b6246 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/list_dialog_master.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/list_dialog_master.xml
@@ -49,7 +49,7 @@
             <value> <string encoding="cdata"><![CDATA[
 
 <tal:block metal:define-macro="master">\n
-  <tal:block metal:use-macro="here/dialog_main/macros/master">\n
+  <tal:block metal:use-macro="here/list_dialog/macros/master">\n
     <tal:block metal:fill-slot="main">\n
       <tal:block metal:define-slot="main" />\n
     </tal:block>\n
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_dialog.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_dialog.xml
new file mode 100644
index 0000000000..6003993f9d
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_dialog.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PageTemplates.ZopePageTemplate</string>
+          <string>ZopePageTemplate</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<tal:block metal:define-macro="master">\n
+  <tal:block tal:define="form_id form/id;\n
+                         list_mode python: True;\n
+                         listmode_default_listbox python: here.ERP5XhtmlStyle_getListbox(form=form);\n
+                         selection_name listmode_default_listbox/selection_name;\n
+                         selection_index request/selection_index | python:0;\n
+                         dummy python: selection_name and request.set(\'selection_name\', selection_name);\n
+\n
+                         local_parameter_list local_parameter_list | python: {};\n
+                         dummy python: local_parameter_list.update({\'selection_name\': selection_name, \'selection_index\': selection_index, \'form_id\': form_id});">\n
+    <tal:block metal:use-macro="here/dialog_main/macros/master">\n
+      <tal:block metal:fill-slot="main">\n
+        <tal:block metal:define-slot="main" />\n
+      </tal:block>\n
+    </tal:block>\n
+  </tal:block>\n
+</tal:block>
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>list_dialog</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index 4fc233b7ab..5484d82917 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-261
+262
-- 
2.30.9