delete an item using form buttons

"Miguel Sanchez Beato" <[email protected]> Fri, 24 Feb 2006 17:17:53 +0100
Newsgroups gmane.comp.web.zope.plone.design
Message-ID <[email protected]>
------=_Part_14567_9265337.1140797873059
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi. I'm customizing templates from 'CMF Message' and I've found some
problems trying to delete the message once you've read it, that it, I
ead
the message (message_view.pt) so I can see the message author,subject and
text. At the same time I've got 3 options (form buttons
'class=3Dstandalone')
DELETE/ACKNOWLEDGE/REPLY. I have problems trying to delete the message
because I don't want the browser to go to the folder contents page in my
plone instance (I don't want my users can manage the message contents in
this case, I just want them to see the message, delete it and go back to
the
message fron-page view mode). So, the delete mode from 'message_view.pt'
template looks like:
 ...
 ...
 <form name=3D"delete"
       action=3D""
       method=3D"post"
       style=3D"display:inline"
       tal:attributes=3D"action request/URL2">

 <input tal:define=3D"getRelativeContentU RL
 nocall:utool/getRelativeContentURL;
                    hasGetUrl python:hasattr(context.aq_explicit,
 'getURL');
            item_rel_url python:hasGetUrl and context.getURL(relative=3D1)
 or
 getRelativeContentURL(context);"
            type=3D"hidden" name=3D"paths:list"
            tal:attributes=3D"value item_rel_url" />

         <input class=3D"standalone"
                            type=3D"submit"
                            name=3D"folder_delete:method"
                            value=3D"Eliminar"
                            i18n:attributes=3D"value" />

 </form>
 ...
 ...

I think the problem has something to do with 'action request/URL2' (in
fact I can "move" the browser to different pages using request/URL<i> but
always in contents mode, not in view mode) and maybe with
folder_delete:method.
Is there any way to (auto)delete the message and take you to some view
mode like the portal/front-page?
thanks!

------=_Part_14567_9265337.1140797873059
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi. I'm customizing templates from 'CMF Message' and I've found some<br>

problems trying to delete the message once you've read it, that it, I &nbsp=
;<br>

ead<br>

the message (message_view.pt) so I can see the message author,subject and<b=
r>

text. At the same time I've got 3 options (form buttons &nbsp;<br>

'class=3Dstandalone')<br>

DELETE/ACKNOWLEDGE/REPLY. I have problems trying to delete the message<br>

because I don't want the browser to go to the folder contents page in my<br=
>

plone instance (I don't want my users can manage the message contents in<br=
>

this case, I just want them to see the message, delete it and go back to &n=
bsp;<br>

the<br>

message fron-page view mode). So, the delete mode from 'message_view.pt'<br=
>

template looks like:<br>

&nbsp;...<br>

&nbsp;...<br>

&nbsp;&lt;form name=3D&quot;delete&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; action=3D&quot;&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; method=3D&quot;post&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style=3D&quot;display:inline&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:attributes=3D&quot;action request/=
URL2&quot;&gt;<br>

<br>

&nbsp;&lt;input tal:define=3D&quot;getRelativeContentU
<div id=3D"mb_0">RL &nbsp;<br>
&nbsp;nocall:utool/getRelativeContentURL;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
hasGetUrl python:hasattr(context.aq_explicit, &nbsp;<br>
&nbsp;'getURL');<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
item_rel_url python:hasGetUrl and context.getURL(relative=3D1) &nbsp;<br>
&nbsp;or<br>
&nbsp;getRelativeContentURL(context);&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=3D&=
quot;hidden&quot; name=3D&quot;paths:list&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:attr=
ibutes=3D&quot;value item_rel_url&quot; /&gt;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input class=3D&quot;st=
andalone&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
type=3D&quot;submit&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;
name=3D&quot;folder_delete:method&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;
value=3D&quot;Eliminar&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;
i18n:attributes=3D&quot;value&quot; /&gt;<br>
<br>
&nbsp;&lt;/form&gt;<br>
&nbsp;...<br>
&nbsp;...<br>
<br>
I think the problem has something to do with 'action request/URL2' (in &nbs=
p;<br>
fact I can &quot;move&quot; the browser to different pages using request/UR=
L&lt;i&gt; but &nbsp;<br>
always in contents mode, not in view mode) and maybe with folder_delete:met=
hod.<br>
Is there any way to (auto)delete the message and take you to some view &nbs=
p;<br>
mode like the portal/front-page?<br>
thanks!</div>

------=_Part_14567_9265337.1140797873059--


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642