Commit 0143be37 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Renamed to Folder_delete.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 494e78bd
## Script (Python) "folder_delete"
##title=Delete objects from a folder
##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=''
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 )
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