[Zope] Form to remove files

Sture Lygren raver@pc-125.andoy.vgs.no
Sat, 1 May 1999 21:09:30 -0100


Hi!

Hope someone can help me with this one:

I want to make a form that can be used to remove files from several folders. I've made it so that my form displays the different folders and the files contained in them. Each file has a checkbox to it, and the plan was that I could choose the files to be deleted by checking out the correct checkboxes. But - now I'm stuck here - of course I need to pass the containing folders for the files to a delete method - how can this be done?

Once more - how can I get both folder-ids and file-ids be submitted from the form below?

<FORM ACTION="slett_dok" METHOD="POST">
 <!--#in "objectValues(['Folder'])"-->
  <img src="<!--#var icon-->" width="15" height="15"> 
   <!--#var id--><BR>
  <!--#in "objectValues(['File'])"-->
   &nbsp&nbsp<img src="<!--#var icon-->" width="15" height="15"> 
    <!--#var id-->
   &nbsp&nbsp&nbsp<INPUT TYPE="checkbox" NAME="file_list" 
    VALUE="<!--#var id-->"><BR>
  <!--#/in-->
 <!--#/in-->
 <BR>
 <INPUT TYPE="SUBMIT" VALUE="Remove files"><INPUT TYPE="RESET" VALUE="Cancel">
</FORM>

If it's not possible then - I can submit on the selected file-ids to an external method - no problem. But within this external method I would need to parse the whole hierarchy of folders/files and check if the files have same ids as the ones in the submitted list - if equal then the file shoul be deleted. How can this be done?

Any help is much appreciated!

Sture Lygren