Index: /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit_form.pt	(revision 2020)
+++ /WAeUP_SRP/trunk/skins/waeup_default/waeup_edit_form.pt	(revision 2021)
@@ -9,22 +9,47 @@
            is_allowed context/isSectionOfficer;
            metadata metadata|nothing;
-           template here/main_template/macros/master;
-           ">
-<metal:block define-macro="edit_form">
-  <metal:block use-macro=template>
+           template here/main_template/macros/master;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro=template>
       <metal:block fill-slot="style_slot">
-      <script type="text/javascript" src="prototype.js"
-              tal:attributes="src string:${base_url}prototype.js"></script>
-      <script type="text/javascript" src="effects.js"
-              tal:attributes="src string:${base_url}effects.js"></script>
-      <script type="text/javascript" src="controls.js"
-              tal:attributes="src string:${base_url}controls.js"></script>
-      <script type="text/javascript" src="cpsdocument.js"
-              tal:attributes="src string:${base_url}cpsdocument.js"></script>
-      <script type="text/javascript" src="cpsschemas.js"
-              tal:attributes="src string:${base_url}cpsschemas.js"></script>
-
-    </metal:block>
-  <metal:block fill-slot="header">
+        <link rel="Stylesheet" type="text/css" href=""
+              tal:attributes="href string:${base_url}document.css" />
+        <metal:block define-macro="widgets_javascript">
+          <span tal:condition="python:0">
+            <script type="text/javascript" src="prototype.js"
+                    tal:attributes="src string:${base_url}prototype.js"></script>
+            <script type="text/javascript" src="effects.js"
+                    tal:attributes="src string:${base_url}effects.js"></script>
+            <script type="text/javascript" src="controls.js"
+                    tal:attributes="src string:${base_url}controls.js"></script>
+            <script type="text/javascript" src="cpsdocument.js"
+                    tal:attributes="src string:${base_url}cpsdocument.js"></script>
+            <script type="text/javascript" src="cpsschemas.js"
+                    tal:attributes="src string:${base_url}cpsschemas.js"></script>
+          </span>
+          <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
+            <script type="text/javascript">
+              var popup_editor_form = 'popup_fckeditor_form';
+              var width = 640;
+              var height = 520;
+            </script>
+          </tal:block>
+          <script type="text/javascript">
+            function popup_rte(input_id, label_edit) {
+            var args, value;
+            value = document.getElementById(input_id).value;
+            args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
+            str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
+            popup = window.open(popup_editor_form + args, input_id, str_window_features);
+            if (!popup.opener) {
+            popup.opener = window;
+            }
+            return false;
+            }
+          </script>
+        </metal:block>
+      </metal:block>
+      <metal:block fill-slot="header">
     <span tal:condition="not: is_allowed">
         <span tal:content="here/illegal_view" />
@@ -101,29 +126,4 @@
         </tal:block>
         <metal:block use-macro="python:path('context/%s_edit_buttons/macros/buttons' % form_type)"/>
-
-          <tal:block define="
-          use_ajax use_ajax|python:True;
-          content_changed python:cpsmcat('psm_content_changed');
-          content_error python:cpsmcat('psm_content_error');
-          working python:cpsmcat('psm_ajax_working')"
-          condition="python:use_ajax">
-            <script type="text/javascript"
-                    tal:content="string:
-                    // unobtrusive form controller, that leaves the form accessible
-                    var editor = new CPSDocumentEditor(
-                    'editForm',
-                    $$('editForm').action,
-                    'editForm',
-                    new Array('cpsdocument_edit_button'),
-                    new Array('cpsdocument_edit_and_view_button'),
-                    'page_title',
-                    {content_changed: '${content_changed}',
-                    working: '${working}',
-                    content_error: '${content_error}'},
-                    null,
-                    new Array('addwidget_button'));"
-                    >
-            </script>
-          </tal:block>
         </div>
       </form>
