<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>Script_magic</string> </key>
            <value> <int>3</int> </value>
        </item>
        <item>
            <key> <string>_bind_names</string> </key>
            <value>
              <object>
                <klass>
                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_asgns</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>name_container</string> </key>
                                <value> <string>container</string> </value>
                            </item>
                            <item>
                                <key> <string>name_context</string> </key>
                                <value> <string>context</string> </value>
                            </item>
                            <item>
                                <key> <string>name_m_self</string> </key>
                                <value> <string>script</string> </value>
                            </item>
                            <item>
                                <key> <string>name_subpath</string> </key>
                                <value> <string>traverse_subpath</string> </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>_body</string> </key>
            <value> <string>REQUEST=context.REQUEST\n
error_message = \'\'\n
Base_translateString = context.Base_translateString\n
\n
if context.cb_dataValid:\n
  # We first look if the content of objects to paste is allowed\n
  # inside this folder\n
  object_list = context.cb_dataItems()\n
  try:\n
    portal_type_list = [x.getPortalType() for x in object_list]\n
  except AttributeError:\n
    error_message = Base_translateString(\'Sorry, you can not paste these items here.\')\n
  else:\n
    allowed_type_list = [x for x in context.getVisibleAllowedContentTypeList()]\n
    for portal_type in portal_type_list:\n
      if portal_type not in allowed_type_list:\n
        error_message = Base_translateString(\'Sorry, you can not paste these items here.\')\n
\n
if context.cb_dataValid and error_message==\'\':\n
  try:\n
    new_item_list = context.manage_pasteObjects(REQUEST[\'__cp\'])\n
  except KeyError:\n
    return context.Base_redirect(form_id,\n
              keep_items=dict(portal_status_message=Base_translateString(\'Nothing to paste.\')))\n
  else:\n
    new_id_list = [i[\'new_id\'] for i in new_item_list]\n
    return context.Base_redirect(form_id,\n
          keep_items=dict(portal_status_message=Base_translateString(\'Items paste in progress.\')))\n
\n
elif context.cb_dataValid and error_message != \'\':\n
  return context.Base_redirect(form_id, keep_items=dict(portal_status_message=error_message))\n
\n
error_message = Base_translateString(\'Copy or cut one or more items to paste first.\')\n
return context.Base_redirect(form_id, keep_items=dict(portal_status_message=error_message))\n
</string> </value>
        </item>
        <item>
            <key> <string>_code</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>form_id</string> </value>
        </item>
        <item>
            <key> <string>errors</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
        <item>
            <key> <string>func_code</string> </key>
            <value>
              <object>
                <klass>
                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>co_argcount</string> </key>
                        <value> <int>1</int> </value>
                    </item>
                    <item>
                        <key> <string>co_varnames</string> </key>
                        <value>
                          <tuple>
                            <string>form_id</string>
                            <string>_getattr_</string>
                            <string>context</string>
                            <string>REQUEST</string>
                            <string>error_message</string>
                            <string>Base_translateString</string>
                            <string>object_list</string>
                            <string>append</string>
                            <string>$append0</string>
                            <string>_getiter_</string>
                            <string>x</string>
                            <string>portal_type_list</string>
                            <string>AttributeError</string>
                            <string>allowed_type_list</string>
                            <string>portal_type</string>
                            <string>_getitem_</string>
                            <string>new_item_list</string>
                            <string>KeyError</string>
                            <string>dict</string>
                            <string>i</string>
                            <string>new_id_list</string>
                          </tuple>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>func_defaults</string> </key>
            <value>
              <none/>
            </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Folder_paste</string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string>Paste objects to a folder from the clipboard</string> </value>
        </item>
        <item>
            <key> <string>warnings</string> </key>
            <value>
              <tuple/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
