From cf89a05173761be14ae43cf9b5d3ed3bbaa7815a Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Tue, 2 Sep 2008 14:12:07 +0000
Subject: [PATCH] add an information area to signal if a field in the second
 page is missing or not well filled

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23345 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_egov/template_erp5_egov.css.xml      | 22 +++++++++++++++++++
 .../erp5_egov/template_erp5_egov_form.xml     |  5 ++++-
 .../template_erp5_egov_workspace.xml          |  5 ++++-
 bt5/erp5_egov/bt/revision                     |  2 +-
 4 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov.css.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov.css.xml
index 87cc3da1f6..53d19a93b1 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov.css.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov.css.xml
@@ -9,6 +9,10 @@
     </pickle>
     <pickle>
       <dictionary>
+        <item>
+            <key> <string>_Cacheable__manager_id</string> </key>
+            <value> <string>root_http_skin_cache</string> </value>
+        </item>
         <item>
             <key> <string>__ac_local_roles__</string> </key>
             <value>
@@ -674,6 +678,18 @@ fieldset.register_informations{\n
 .become_member_body  ul{\n
   list-style-image: url(\'img/puce1.png\')\n
 }\n
+\n
+#information_area {\n
+  margin-top: 1em;\n
+  padding:0.5em 1em 0.5em 1em;\n
+  margin-bottom: 1em;\n
+  border-width: 1px;\n
+  border-style: dotted;\n
+  border-color: black;\n
+  color: red;\n
+  background-color: <dtml-var document_background_color>;\n
+  font-weight: bold;\n
+}\n
 
 
 ]]></string> </value>
@@ -694,6 +710,12 @@ fieldset.register_informations{\n
             <key> <string>title</string> </key>
             <value> <string></string> </value>
         </item>
+        <item>
+            <key> <string>uid</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_form.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_form.xml
index b0def16043..56ffc7ae75 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_form.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_form.xml
@@ -110,7 +110,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
                 Normally a message should be displayed when saving an object through web interface... -->\n
           <div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
         </tal:block>\n
-\n
+        <div id="information_area" tal:condition="python: request.has_key(\'field_errors\')" \n
+            i18n:translate="" i18n:domain="ui">\n
+          Input data has errors. Please look at error messages below.\n
+        </div>\n
         <tal:block metal:define-slot="main"/>\n
 \n
       </div>\n
diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_workspace.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_workspace.xml
index 00d1e2af46..83db818ad6 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_workspace.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/template_erp5_egov_workspace.xml
@@ -110,7 +110,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
                 Normally a message should be displayed when saving an object through web interface... -->\n
           <div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
         </tal:block>\n
-\n
+        <div id="information_area" tal:condition="python: request.has_key(\'field_errors\')" \n
+            i18n:translate="" i18n:domain="ui">\n
+          Input data has errors. Please look at error messages below.\n
+        </div>\n
         <tal:block metal:define-slot="main"/>\n
 \n
       </div>\n
diff --git a/bt5/erp5_egov/bt/revision b/bt5/erp5_egov/bt/revision
index ac7cd1ac70..9ce0f492d8 100644
--- a/bt5/erp5_egov/bt/revision
+++ b/bt5/erp5_egov/bt/revision
@@ -1 +1 @@
-279
\ No newline at end of file
+241
\ No newline at end of file
-- 
2.30.9