Index: WAeUP_SRP/trunk/skins/waeup_custom/cpsdocument_create.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/cpsdocument_create.py	(revision 310)
+++ WAeUP_SRP/trunk/skins/waeup_custom/cpsdocument_create.py	(revision 310)
@@ -0,0 +1,52 @@
+## Script (Python) "cpsdocument_create"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None, type_name=None
+##title=
+##
+# $Id: cpsdocument_create.py 32984 2006-02-17 19:30:42Z janguenot $
+"""
+Called when a document form is posted.
+
+Validates data, then:
+
+ - if there's no error, updates the object and redirects to it,
+
+ - if there's an error, puts data in session and redirects to creation form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+from urllib import urlencode
+from Products.CMFCore.utils import getToolByName
+from Products.CPSDocument.utils import getFormUidUrlArg
+
+ti = getToolByName(context, 'portal_types').getTypeInfo(type_name)
+
+is_valid, ds = ti.validateObject(None, layout_mode='create',
+                                 request=REQUEST, context=context,
+                                 cluster=cluster, use_session=True)
+
+if is_valid:
+    meth_id = ti.queryMethodID('create_do', 'cpsdocument_create_do')
+    ob = getattr(context, meth_id)(type_name, ds.getDataModel())
+    url = ob.absolute_url()
+    meth_id = ti.queryMethodID('created', None)
+    if meth_id is not None:
+        getattr(context, meth_id)(object=ob)
+    action = ob.getTypeInfo().immediate_view
+    psm = 'psm_content_created'
+    args = {}
+else:
+    url = context.absolute_url()
+    action = 'cpsdocument_create_form'
+    psm = 'psm_content_error'
+    args = {'type_name': type_name}
+    args.update(getFormUidUrlArg(REQUEST))
+
+args['portal_status_message'] = psm
+url = url + '/' + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk/skins/waeup_custom/standart_error_message.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/standart_error_message.pt	(revision 310)
+++ WAeUP_SRP/trunk/skins/waeup_custom/standart_error_message.pt	(revision 310)
@@ -0,0 +1,54 @@
+<metal:html tal:define="showthirdcol nothing;
+                        error_type options/error_type|nothing;
+                        error_value options/error_value|nothing;
+                        error_message options/error_message|nothing;
+                        error_tb options/error_tb|nothing;
+                        error_traceback options/error_traceback|nothing;
+                        error_log_url options/error_log_url|nothing;
+                        p_props here/portal_properties;
+                       ">
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main">
+
+<tal:haserror condition="error_type">
+  <tal:NotFound condition="python:error_type == 'NotFound'">
+    <metal:block use-macro="here/error_lib_not_found/macros/not_found" />
+  </tal:NotFound>
+
+  <tal:default condition="python:error_type != 'NotFound'">
+    <metal:block use-macro="here/error_lib_other/macros/other" />
+  </tal:default>
+
+  <tal:debugging condition="python:1 or checkPerm('Manage portal', here)">
+    <table width="100%" cellpadding="2" cellspacing="2">
+      <tr>
+        <th width="10%">Error Type:</th>
+        <td tal:content="error_type"></td>
+      </tr>
+      <tr>
+        <th>Error Value:</th>
+        <td><pre tal:content="structure error_value" /></td>
+      </tr>
+      <tr>
+        <th>Traceback:</th>
+        <td><pre tal:content="structure error_traceback" /></td>
+      </tr>
+    </table>
+    <hr />
+    <pre tal:content="structure request" />
+    <hr />
+    <a href="" tal:condition="python:error_log_url"
+               tal:attributes="href error_log_url">
+      Show Error Log Entry
+    </a>
+  </tal:debugging>
+</tal:haserror>
+
+<tal:hasnoerror tal:condition="not:error_type">
+  In Heaven, everything's fine but not here ...
+</tal:hasnoerror>
+
+</metal:main>
+</metal:body>
+</metal:html>
