From 8d68aaf735629b4367a68550a9830f2df883b585 Mon Sep 17 00:00:00 2001
From: Lucas Carvalho <lucas@nexedi.com>
Date: Thu, 20 Aug 2009 18:50:45 +0000
Subject: [PATCH] 2009-08-20 lucas * Merged the three forms
 (SaleOrder_viewAsWebConfirmPaymentMode,
 SaleOrder_viewAsWebConfirmPersonalInformation and SaleOrder_viewAsWebConfirm)
 into only one SaleOrder_viewAsWebConfirm.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28532 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../SaleOrder_paymentRedirect.xml             |   2 +-
 .../SaleOrder_viewAsWebConfirm.xml            |  10 +-
 .../customer.xml                              |  44 ++--
 .../fake_payment.xml                          | 191 ------------------
 .../my_payment_mode.xml                       |  46 ++++-
 .../{fake_form.xml => payment.xml}            |  29 ++-
 .../SaleOrder_viewAsWebConfirm/submit.xml     |  64 +++---
 .../SaleOrder_viewAsWebConfirmPaymentMode.xml | 146 -------------
 .../fake_payment.xml                          | 191 ------------------
 ...er_viewAsWebConfirmPersonalInformation.xml | 146 -------------
 .../confirm_information.xml                   | 191 ------------------
 bt5/erp5_commerce/bt/change_log               |   4 +
 bt5/erp5_commerce/bt/revision                 |   2 +-
 13 files changed, 149 insertions(+), 917 deletions(-)
 rename bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/{SaleOrder_viewAsWebConfirmPersonalInformation => SaleOrder_viewAsWebConfirm}/customer.xml (90%)
 delete mode 100644 bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_payment.xml
 rename bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/{SaleOrder_viewAsWebConfirmPaymentMode => SaleOrder_viewAsWebConfirm}/my_payment_mode.xml (87%)
 rename bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/{fake_form.xml => payment.xml} (86%)
 delete mode 100644 bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode.xml
 delete mode 100644 bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/fake_payment.xml
 delete mode 100644 bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation.xml
 delete mode 100644 bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/confirm_information.xml

diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml
index 92d8c93c78..3acfd72663 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/SaleOrder_paymentRedirect.xml
@@ -67,7 +67,7 @@ else:\n
     msg = translateString("This payment mode is actually not activated, sorry: ${payment_mode}", \n
                           mapping=dict(payment_mode=field_my_payment_mode))\n
 \n
-context.Base_redirect(\'SaleOrder_viewAsWebConfirmPaymentMode\', \\\n
+context.Base_redirect(\'SaleOrder_viewAsWebConfirm\', \\\n
                         keep_items={\'portal_status_message\': msg})\n
 return\n
 </string> </value>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm.xml
index a8d59d6502..d548d4139f 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm.xml
@@ -95,16 +95,18 @@
                       <list>
                         <string>shopping_cart</string>
                         <string>discounts</string>
-                        <string>fake_form</string>
-                        <string>submit</string>
-                        <string>fake_payment</string>
+                        <string>payment</string>
+                        <string>my_payment_mode</string>
+                        <string>customer</string>
                       </list>
                     </value>
                 </item>
                 <item>
                     <key> <string>right</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <string>submit</string>
+                      </list>
                     </value>
                 </item>
               </dictionary>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/customer.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/customer.xml
similarity index 90%
rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/customer.xml
rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/customer.xml
index 0e78a79cbd..6eba6f67b2 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/customer.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/customer.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.ERP5Form.EditorField</string>
-          <string>EditorField</string>
-        </tuple>
-        <none/>
+        <global name="EditorField" module="Products.ERP5Form.EditorField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -166,7 +163,9 @@
                 </item>
                 <item>
                     <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+                    </value>
                 </item>
                 <item>
                     <key> <string>max_length</string> </key>
@@ -184,6 +183,10 @@
                     <key> <string>required</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>text_editor</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>title</string> </key>
                     <value> <string></string> </value>
@@ -263,9 +266,13 @@
                     <key> <string>required</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>text_editor</string> </key>
+                    <value> <string>text_area</string> </value>
+                </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>Customer information</string> </value>
+                    <value> <string>Customer Information</string> </value>
                 </item>
                 <item>
                     <key> <string>unicode</string> </key>
@@ -288,11 +295,8 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -304,4 +308,20 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_payment.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_payment.xml
deleted file mode 100644
index e623a2dec0..0000000000
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_payment.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>fake_payment</string> </value>
-        </item>
-        <item>
-            <key> <string>message_values</string> </key>
-            <value>
-              <dictionary/>
-            </value>
-        </item>
-        <item>
-            <key> <string>overrides</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>tales</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>values</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string>hiddenLabel</string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string>Choose payment and Buy</string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <int>0</int> </value>
-                </item>
-                <item>
-                    <key> <string>image</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string>SaleOrder_viewAsWebConfirmPersonalInformation:method</string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string>Fake Payment</string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/my_payment_mode.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/my_payment_mode.xml
similarity index 87%
rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/my_payment_mode.xml
rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/my_payment_mode.xml
index 4a054d240e..c33f907c8b 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/my_payment_mode.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/my_payment_mode.xml
@@ -117,7 +117,9 @@
                 </item>
                 <item>
                     <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
                 </item>
                 <item>
                     <key> <string>default</string> </key>
@@ -153,12 +155,14 @@
                 </item>
                 <item>
                     <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+                    </value>
                 </item>
                 <item>
                     <key> <string>items</string> </key>
                     <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                      <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
                     </value>
                 </item>
                 <item>
@@ -248,7 +252,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>Payment method</string> </value>
+                    <value> <string>Payment Mode:</string> </value>
                 </item>
                 <item>
                     <key> <string>unicode</string> </key>
@@ -275,7 +279,39 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: here.getWebSiteValue().getLayoutProperty(\'ecommerce_payment_mode_list\', \'\')</string> </value>
+            <value> <string>python: not here.SaleOrder_isConsistent() and \'hiddenLabel\' or \'\'</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="4" aka="AAAAAAAAAAQ=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>python: [o.getTitle() for o in here.getPortalObject().portal_categories.payment_mode.contentValues() if o.getId() in here.getWebSiteValue().getLayoutProperty(\'ecommerce_payment_mode_list\', \'\')]</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_form.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/payment.xml
similarity index 86%
rename from bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_form.xml
rename to bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/payment.xml
index 59ebaca8f0..a13b96a834 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/fake_form.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/payment.xml
@@ -11,7 +11,7 @@
       <dictionary>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>fake_form</string> </value>
+            <value> <string>payment</string> </value>
         </item>
         <item>
             <key> <string>message_values</string> </key>
@@ -88,7 +88,9 @@
                 </item>
                 <item>
                     <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
                 </item>
                 <item>
                     <key> <string>title</string> </key>
@@ -109,14 +111,13 @@
                     <key> <string>default</string> </key>
                     <value> <string encoding="cdata"><![CDATA[
 
-<form name="" method="post">\n
-</form>
+<h2>Select Payment Mode</h2>
 
 ]]></string> </value>
                 </item>
                 <item>
                     <key> <string>description</string> </key>
-                    <value> <string>This is a dirty hack to allow online payment form below.</string> </value>
+                    <value> <string></string> </value>
                 </item>
                 <item>
                     <key> <string>editable</string> </key>
@@ -136,7 +137,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>fake_form</string> </value>
+                    <value> <string>Select Payment Mode</string> </value>
                 </item>
               </dictionary>
             </value>
@@ -144,4 +145,20 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/submit.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/submit.xml
index bdff0e16d2..cf4bf31937 100644
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/submit.xml
+++ b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirm/submit.xml
@@ -3,7 +3,7 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <global name="LabelField" module="Products.Formulator.StandardFields"/>
+        <global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
         <tuple/>
       </tuple>
     </pickle>
@@ -23,6 +23,10 @@
             <key> <string>overrides</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>css_class</string> </key>
                     <value> <string></string> </value>
@@ -51,6 +55,14 @@
                     <key> <string>hidden</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>image</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>name</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>title</string> </key>
                     <value> <string></string> </value>
@@ -62,15 +74,17 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>css_class</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>
                     <key> <string>default</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
+                    <value> <string></string> </value>
                 </item>
                 <item>
                     <key> <string>description</string> </key>
@@ -91,9 +105,17 @@
                 <item>
                     <key> <string>hidden</string> </key>
                     <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
                     </value>
                 </item>
+                <item>
+                    <key> <string>image</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>name</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>title</string> </key>
                     <value> <string></string> </value>
@@ -105,13 +127,17 @@
             <key> <string>values</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>css_class</string> </key>
                     <value> <string>hiddenLabel</string> </value>
                 </item>
                 <item>
                     <key> <string>default</string> </key>
-                    <value> <string></string> </value>
+                    <value> <string>Buy</string> </value>
                 </item>
                 <item>
                     <key> <string>description</string> </key>
@@ -119,7 +145,7 @@
                 </item>
                 <item>
                     <key> <string>editable</string> </key>
-                    <value> <int>0</int> </value>
+                    <value> <int>1</int> </value>
                 </item>
                 <item>
                     <key> <string>enabled</string> </key>
@@ -133,6 +159,14 @@
                     <key> <string>hidden</string> </key>
                     <value> <int>0</int> </value>
                 </item>
+                <item>
+                    <key> <string>image</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>name</string> </key>
+                    <value> <string>SaleOrder_paymentRedirect:method</string> </value>
+                </item>
                 <item>
                     <key> <string>title</string> </key>
                     <value> <string>Pay Button</string> </value>
@@ -144,22 +178,6 @@
     </pickle>
   </record>
   <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>here/SaleOrder_viewAsWebConfirmPersonalInformation</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="3" aka="AAAAAAAAAAM=">
     <pickle>
       <tuple>
         <global name="TALESMethod" module="Products.Formulator.TALESField"/>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode.xml
deleted file mode 100644
index 3168a3fa46..0000000000
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="ERP5Form" module="Products.ERP5Form.Form"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <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/>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_objects</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>action</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>description</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>encoding</string> </key>
-            <value> <string>UTF-8</string> </value>
-        </item>
-        <item>
-            <key> <string>enctype</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>group_list</string> </key>
-            <value>
-              <list>
-                <string>left</string>
-                <string>right</string>
-                <string>center</string>
-                <string>bottom</string>
-                <string>hidden</string>
-              </list>
-            </value>
-        </item>
-        <item>
-            <key> <string>groups</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>bottom</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>center</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>left</string> </key>
-                    <value>
-                      <list>
-                        <string>my_payment_mode</string>
-                        <string>fake_payment</string>
-                      </list>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>right</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>SaleOrder_viewAsWebConfirmPaymentMode</string> </value>
-        </item>
-        <item>
-            <key> <string>method</string> </key>
-            <value> <string>POST</string> </value>
-        </item>
-        <item>
-            <key> <string>name</string> </key>
-            <value> <string>Product_view</string> </value>
-        </item>
-        <item>
-            <key> <string>pt</string> </key>
-            <value> <string>form_view_editable</string> </value>
-        </item>
-        <item>
-            <key> <string>row_length</string> </key>
-            <value> <int>4</int> </value>
-        </item>
-        <item>
-            <key> <string>stored_encoding</string> </key>
-            <value> <string>UTF-8</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string>Confirm Order</string> </value>
-        </item>
-        <item>
-            <key> <string>unicode_mode</string> </key>
-            <value> <int>0</int> </value>
-        </item>
-        <item>
-            <key> <string>update_action</string> </key>
-            <value> <string></string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/fake_payment.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/fake_payment.xml
deleted file mode 100644
index eb2f899579..0000000000
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPaymentMode/fake_payment.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>fake_payment</string> </value>
-        </item>
-        <item>
-            <key> <string>message_values</string> </key>
-            <value>
-              <dictionary/>
-            </value>
-        </item>
-        <item>
-            <key> <string>overrides</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>tales</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>values</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string>hiddenLabel</string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string>Proceed</string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <int>0</int> </value>
-                </item>
-                <item>
-                    <key> <string>image</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string>SaleOrder_paymentRedirect:method</string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string>Confirm Payment Method</string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation.xml
deleted file mode 100644
index 4ea2f7e965..0000000000
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="ERP5Form" module="Products.ERP5Form.Form"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <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/>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_objects</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>action</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>description</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>encoding</string> </key>
-            <value> <string>UTF-8</string> </value>
-        </item>
-        <item>
-            <key> <string>enctype</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>group_list</string> </key>
-            <value>
-              <list>
-                <string>left</string>
-                <string>right</string>
-                <string>center</string>
-                <string>bottom</string>
-                <string>hidden</string>
-              </list>
-            </value>
-        </item>
-        <item>
-            <key> <string>groups</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>bottom</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>center</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>left</string> </key>
-                    <value>
-                      <list>
-                        <string>customer</string>
-                        <string>confirm_information</string>
-                      </list>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>right</string> </key>
-                    <value>
-                      <list/>
-                    </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>SaleOrder_viewAsWebConfirmPersonalInformation</string> </value>
-        </item>
-        <item>
-            <key> <string>method</string> </key>
-            <value> <string>POST</string> </value>
-        </item>
-        <item>
-            <key> <string>name</string> </key>
-            <value> <string>Product_view</string> </value>
-        </item>
-        <item>
-            <key> <string>pt</string> </key>
-            <value> <string>form_view_editable</string> </value>
-        </item>
-        <item>
-            <key> <string>row_length</string> </key>
-            <value> <int>4</int> </value>
-        </item>
-        <item>
-            <key> <string>stored_encoding</string> </key>
-            <value> <string>UTF-8</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string>Confirm Order</string> </value>
-        </item>
-        <item>
-            <key> <string>unicode_mode</string> </key>
-            <value> <int>0</int> </value>
-        </item>
-        <item>
-            <key> <string>update_action</string> </key>
-            <value> <string></string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/confirm_information.xml b/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/confirm_information.xml
deleted file mode 100644
index 2d49a3e103..0000000000
--- a/bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce_widget_library/SaleOrder_viewAsWebConfirmPersonalInformation/confirm_information.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
-        <tuple/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>confirm_information</string> </value>
-        </item>
-        <item>
-            <key> <string>message_values</string> </key>
-            <value>
-              <dictionary/>
-            </value>
-        </item>
-        <item>
-            <key> <string>overrides</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>tales</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string></string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-        <item>
-            <key> <string>values</string> </key>
-            <value>
-              <dictionary>
-                <item>
-                    <key> <string>alternate_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string>hiddenLabel</string> </value>
-                </item>
-                <item>
-                    <key> <string>default</string> </key>
-                    <value> <string>Confirm informations</string> </value>
-                </item>
-                <item>
-                    <key> <string>description</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>editable</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>enabled</string> </key>
-                    <value> <int>1</int> </value>
-                </item>
-                <item>
-                    <key> <string>extra</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>hidden</string> </key>
-                    <value> <int>0</int> </value>
-                </item>
-                <item>
-                    <key> <string>image</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key> <string>name</string> </key>
-                    <value> <string>SaleOrder_viewAsWebConfirmPaymentMode:method</string> </value>
-                </item>
-                <item>
-                    <key> <string>title</string> </key>
-                    <value> <string>Confirm informations</string> </value>
-                </item>
-              </dictionary>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="2" aka="AAAAAAAAAAI=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>_text</string> </key>
-            <value> <string>not: here/SaleOrder_isConsistent</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_commerce/bt/change_log b/bt5/erp5_commerce/bt/change_log
index e6d723332b..31a43947bf 100644
--- a/bt5/erp5_commerce/bt/change_log
+++ b/bt5/erp5_commerce/bt/change_log
@@ -1,3 +1,7 @@
+2009-08-20 lucas
+* Merged the three forms (SaleOrder_viewAsWebConfirmPaymentMode,
+SaleOrder_viewAsWebConfirmPersonalInformation and SaleOrder_viewAsWebConfirm) into only one SaleOrder_viewAsWebConfirm.
+
 2008-11-13 ivan
 * Move portal_sessions to erp5_core
 
diff --git a/bt5/erp5_commerce/bt/revision b/bt5/erp5_commerce/bt/revision
index 34bba940d1..59f3135037 100644
--- a/bt5/erp5_commerce/bt/revision
+++ b/bt5/erp5_commerce/bt/revision
@@ -1 +1 @@
-156
\ No newline at end of file
+165
\ No newline at end of file
-- 
2.30.9