Commit 5cd823cf authored by Yoshinori Okuji's avatar Yoshinori Okuji

Renamed from base_folder_delete.py to Folder_delete.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1526 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 59c1756b
## Script (Python) "Folder_delete"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=form_id='',selection_index=None,object_uid=None,selection_name=None,field_id=None,uids=None,cancel_url='',listbox_uid=[],md5_object_uid_list=''
##title=Delete objects from a folder
##
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)
error = context.portal_selections.selectionHasChanged(md5_object_uid_list,uids)
#return uids
REQUEST=context.REQUEST
#REQUEST.set('uids',uids)
qs = ''
ret_url = ''
ret_url = context.absolute_url() + '/' + form_id
if error:
qs = '?portal_status_message=Sorry+your+selection+has+changed'
elif uids is not None:
context.manage_delObjects(uids=uids, REQUEST=REQUEST)
qs = '?portal_status_message=Deleted.'
else:
qs = '?portal_status_message=Please+select+one+or+more+items+first.'
return REQUEST.RESPONSE.redirect( ret_url + qs )
## Script (Python) "base_folder_delete"
##title=Delete objects from a folder
##parameters=selection_index=None,form_id='',uids=[], listbox_uid=[],selection_name=''
request=context.REQUEST
selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids)
uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name)
kw = {'uid': uids}
request.set('object_uid', context.getUid())
request.set('uids', uids)
context.portal_selections.setSelectionParamsFor('folder_delete_selection', kw)
return context.folder_delete_view(uids=uids, REQUEST=request)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment