[Erp5-report] r23322 - in /erp5/trunk/bt5/erp5_egov: SkinTemplateItem/portal_skins/erp5_ego...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 1 15:34:39 CEST 2008


Author: fabien
Date: Mon Sep  1 15:34:31 2008
New Revision: 23322

URL: http://svn.erp5.org?rev=23322&view=rev
Log:
modify EGov_createNewProcedure and EGov_register to ask captcha if a user want to create a new document without been authenticated.

Modified:
    erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_createNewProcedure.xml
    erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_register.xml
    erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox.xml
    erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox_getCreationDate.xml
    erp5/trunk/bt5/erp5_egov/bt/revision

Modified: erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_createNewProcedure.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_createNewProcedure.xml?rev=23322&r1=23321&r2=23322&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_createNewProcedure.xml (original)
+++ erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_createNewProcedure.xml Mon Sep  1 15:34:31 2008
@@ -67,15 +67,21 @@
             <key> <string>_body</string> </key>
             <value> <string>request=context.REQUEST\n
 \n
-portal_type = new_application_procedure\n
-module = context.getDefaultModule(portal_type=portal_type)\n
-# Create a new procedure\n
-new_procedure = module.newContent(portal_type=portal_type)\n
+if context.portal_membership.isAnonymousUser() and not captcha_ok:\n
+  absolute_url = context.absolute_url()\n
+  new_url = \'captcha/CaptchaAdvertisment\'\n
+  redirect_url = "%s/%s" % (absolute_url, new_url)\n
+else:\n
+  portal_type = new_application_procedure\n
+  module = context.getDefaultModule(portal_type=portal_type)\n
+  # Create a new procedure\n
+  new_procedure = module.newContent(portal_type=portal_type)\n
 \n
-absolute_url = context.absolute_url()\n
-module_id = module.getId()\n
-new_object_id = new_procedure.getId()\n
-redirect_url = "%s/%s/%s/%s" % (absolute_url, module_id, new_object_id, \'view\')\n
+  absolute_url = context.absolute_url()\n
+  module_id = module.getId()\n
+  new_object_id = new_procedure.getId()\n
+\n
+  redirect_url = "%s/%s/%s/%s" % (absolute_url, module_id, new_object_id, \'view\')\n
 \n
 result = request[\'RESPONSE\'].redirect(redirect_url) \n
 return result\n
@@ -101,7 +107,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>new_application_procedure</string> </value>
+            <value> <string>new_application_procedure, captcha_ok=False</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -121,23 +127,25 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>2</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>new_application_procedure</string>
+                            <string>captcha_ok</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>request</string>
+                            <string>absolute_url</string>
+                            <string>new_url</string>
+                            <string>redirect_url</string>
                             <string>portal_type</string>
                             <string>module</string>
                             <string>new_procedure</string>
-                            <string>absolute_url</string>
                             <string>module_id</string>
                             <string>new_object_id</string>
-                            <string>redirect_url</string>
                             <string>_getitem_</string>
                             <string>result</string>
                           </tuple>
@@ -151,12 +159,20 @@
         <item>
             <key> <string>func_defaults</string> </key>
             <value>
-              <none/>
+              <tuple>
+                <int>0</int>
+              </tuple>
             </value>
         </item>
         <item>
             <key> <string>id</string> </key>
             <value> <string>EGov_createNewProcedure</string> </value>
+        </item>
+        <item>
+            <key> <string>uid</string> </key>
+            <value>
+              <none/>
+            </value>
         </item>
         <item>
             <key> <string>warnings</string> </key>

Modified: erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_register.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_register.xml?rev=23322&r1=23321&r2=23322&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_register.xml (original)
+++ erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_register.xml Mon Sep  1 15:34:31 2008
@@ -75,7 +75,7 @@
              "%s/%s?portal_status_message=%s" %\n
              (context.absolute_url(), form_id, translated_message))\n
 \n
-return context.EGov_createNewProcedure(new_application_procedure=\'Subscription Form\')\n
+return context.EGov_createNewProcedure(new_application_procedure=\'Subscription Form\', captcha_ok=True)\n
 </string> </value>
         </item>
         <item>
@@ -141,6 +141,7 @@
                             <string>message</string>
                             <string>translated_message</string>
                             <string>_getitem_</string>
+                            <string>True</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox.xml?rev=23322&r1=23321&r2=23322&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox.xml (original)
+++ erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox.xml Mon Sep  1 15:34:31 2008
@@ -311,6 +311,12 @@
             </value>
         </item>
         <item>
+            <key> <string>uid</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
             <key> <string>values</string> </key>
             <value>
               <dictionary>
@@ -361,7 +367,7 @@
                 </item>
                 <item>
                     <key> <string>css_class</string> </key>
-                    <value> <string></string> </value>
+                    <value> <string>hidden_label</string> </value>
                 </item>
                 <item>
                     <key> <string>default_params</string> </key>

Modified: erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox_getCreationDate.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox_getCreationDate.xml?rev=23322&r1=23321&r2=23322&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox_getCreationDate.xml (original)
+++ erp5/trunk/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/EGov_viewPendingApplicationList/listbox_getCreationDate.xml Mon Sep  1 15:34:31 2008
@@ -240,6 +240,12 @@
                     <value> <string></string> </value>
                 </item>
               </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>uid</string> </key>
+            <value>
+              <none/>
             </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_egov/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_egov/bt/revision?rev=23322&r1=23321&r2=23322&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_egov/bt/revision (original)
+++ erp5/trunk/bt5/erp5_egov/bt/revision Mon Sep  1 15:34:31 2008
@@ -1,1 +1,1 @@
-270
+274




More information about the Erp5-report mailing list