diff --git a/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/form_view.xml b/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/form_view.xml
index 4bb7786d4b2fb939d179db845282b62d22d357d2..79ae3d3b9546b5ca4a20e5ff317077ab7a2651be 100644
--- a/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/form_view.xml
+++ b/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/form_view.xml
@@ -77,18 +77,23 @@ 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
 -->\n
 </tal:block>\n
+\n
 <tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
-                       ignore_layout request/ignore_layout | nothing;\n
-                       editable_mode request/editable_mode | nothing;\n
-                       global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
+                       ignore_layout  request/ignore_layout | nothing;\n
+                       editable_mode  request/editable_mode | nothing;\n
+                       global         layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
                        default_layout string:view_master;\n
-                       layout_id layout_form/pt | default_layout;">\n
+                       layout_id      layout_form/pt | default_layout;">\n
+\n
+\n
 <tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
   <tal:block metal:fill-slot="main">\n
     <tal:block metal:define-macro="form_render">\n
+\n
       <tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n
-                             dummy python: request.set(\'here\',here)"\n
+                             dummy        python: request.set(\'here\',here)"\n
                  tal:condition="python: layout_form_id and not ignore_layout">\n
+\n
         <tal:block tal:condition="not: editable_mode" tal:repeat="group python: form.get_groups()">\n
           <div tal:attributes="class group/lower" tal:condition="python: group.find(\'content\') >= 0">\n
             <tal:block tal:condition="python: \'hidden\' not in group.lower()" tal:repeat="field python:form.get_fields_in_group(group)">\n
@@ -96,22 +101,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
             </tal:block>\n
           </div>\n
         </tal:block>\n
-        <tal:block tal:condition="editable_mode" tal:repeat="group python: form.get_groups()">\n
-          <fieldset tal:condition="python: \'hidden\' not in group.lower()">\n
-            <legend tal:content="group"></legend>\n
-            <table tal:condition="python: \'content\' not in group.lower() and \'bottom\' not in group.lower()">\n
-              <tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n
-                <tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
+\n
+        <div class="fieldgroup" tal:condition="editable_mode">\n
+          <tal:block tal:repeat="group python: form.get_groups()">\n
+            <fieldset tal:condition="python: \'hidden\' not in group.lower()">\n
+              <legend tal:content="group"/>\n
+              <table tal:condition="python: \'content\' not in group.lower() and \'bottom\' not in group.lower()">\n
+                <tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n
+                  <tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
+                </tal:block>\n
+              </table>\n
+              <tal:block tal:condition="python: \'content\' in group.lower() or \'bottom\' in group.lower()"\n
+                         tal:repeat="field python:form.get_fields_in_group(group)">\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
-            </table>\n
-            <tal:block tal:condition="python: \'content\' in group.lower() or \'bottom\' in group.lower()"\n
-              tal:repeat="field python:form.get_fields_in_group(group)">\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
-          </fieldset>\n
-        </tal:block>\n
+            </fieldset>\n
+          </tal:block>\n
+        </div>\n
+\n
       </tal:block>\n
+\n
       <tal:block tal:condition="python: not layout_form_id or ignore_layout">\n
         <tal:block metal:define-macro="form_layout">\n
           <div class="Main" tal:define="field_errors python: request.get(\'field_errors\',{});\n
@@ -161,9 +171,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
           </div>\n
         </tal:block>\n
       </tal:block>\n
+\n
     </tal:block>\n
   </tal:block>\n
 </tal:block>\n
+\n
 </tal:block>
 
 ]]></string> </value>
diff --git a/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/report_view.xml b/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/report_view.xml
index 9d646ba72a34b877b9ee658cdd03d54216e3d5ce..4f234ead863449913300694b567260b0cf527d3e 100644
--- a/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/report_view.xml
+++ b/product/ERP5/bootstrap/erp5_html_style/SkinTemplateItem/portal_skins/erp5_html_style/report_view.xml
@@ -78,15 +78,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
 </tal:block>\n
 \n
 <tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
-                       ignore_layout request/ignore_layout | nothing;\n
-                       editable_mode request/editable_mode | nothing;\n
-                       global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
+                       ignore_layout  request/ignore_layout | nothing;\n
+                       editable_mode  request/editable_mode | nothing;\n
+                       global         layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
                        default_layout string:view_master;\n
-                       layout_id layout_form/pt | default_layout;">\n
+                       layout_id      layout_form/pt | default_layout;">\n
 \n
 <tal:block metal:use-macro="python: getattr(here,layout_id).macros[\'master\']">\n
   <tal:block metal:fill-slot="main">\n
-    <div class="Main">\n
+    <div tal:attributes="class python: editable_mode and \'fieldgroup\' or \'Main\'">\n
       <tal:block tal:define="groups       python: form.get_groups(include_empty=1);\n
                              field_errors python: request.get(\'field_errors\',{});\n
                              dummy        python: request.set(\'here\',here)">\n
diff --git a/product/ERP5/bootstrap/erp5_html_style/bt/change_log b/product/ERP5/bootstrap/erp5_html_style/bt/change_log
index fc05ee4f6f590785cbd55d4236200e54fa333835..54e0e56cb8e2a7b4bdd3075982d4f6f28a4ddf75 100644
--- a/product/ERP5/bootstrap/erp5_html_style/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_html_style/bt/change_log
@@ -1,3 +1,6 @@
+2006-06-21 Kevin
+* In editable mode, enclose main content in a div to act as a fieldgroup.
+
 2006-06-15 Thomas
 * Added support for PlanningBox : including scripts to generate data, and page template to display XHTML.