Re: [Zope] a warning message before performing an action
Thanks you guys, Indeed, I just 'copy & paste' the javascript code from php to my zpt and voilĂ , it worked. Sorry for bothering you guys with such a simple question, but at first I was wondering zope would have something more interesting, never mind. Many thanks. Cheers, Alan On 14/06/07, Maciej Wisniowski <[EMAIL PROTECTED]> wrote: > I have a web page with some buttons ( action (by calling a python script). However, some actions (like > 'delete' a picture for example) I would like to warn user before > performing it. I recall from php how to pop up a window (or a drop > down in Mac OSX) with a warning message prompting a 'Yes' or 'No' > confirmation and I was wondering how would I do it with Zope, with an > example if possible. If you've opened pop up window "with php" then in fact it had to be JavaScript. Possibly you're looking form something like: if (confirm("Do you really want to remove this picture")) return true return false which may be used with onsubmit event of form object. Of course this is javascript code not python. -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a warning message before performing an action
> I have a web page with some buttons ( action (by calling a python script). However, some actions (like > 'delete' a picture for example) I would like to warn user before > performing it. I recall from php how to pop up a window (or a drop > down in Mac OSX) with a warning message prompting a 'Yes' or 'No' > confirmation and I was wondering how would I do it with Zope, with an > example if possible. If you've opened pop up window "with php" then in fact it had to be JavaScript. Possibly you're looking form something like: if (confirm("Do you really want to remove this picture")) return true return false which may be used with onsubmit event of form object. Of course this is javascript code not python. -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: a warning message before performing an action
Alan, on 2007-06-14: > Dears, > > I have a web page with some buttons ( action (by calling a python script). However, some actions (like > 'delete' a picture for example) I would like to warn user before > performing it. I recall from php how to pop up a window (or a drop > down in Mac OSX) with a warning message prompting a 'Yes' or 'No' > confirmation and I was wondering how would I do it with Zope, with an > example if possible. In CMFPlone the 'delete' action leads to the delete_confirmation page template. This asks the user if he is sure that he wants to delete the item. Maybe you can borrow some code from that? See: http://dev.plone.org/plone/browser/CMFPlone/branches/2.5/skins/plone_forms/delete_confirmation.cpt though for some reason nothing is currently visible there. -- Maurits van Rees | http://maurits.vanrees.org/ [NL] Work | http://zestsoftware.nl/ "Do not worry about your difficulties in computers, I can assure you mine are still greater." ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a warning message before performing an action
--On 14. Juni 2007 16:18:11 +0100 Alan <[EMAIL PROTECTED]> wrote: Dears, I have a web page with some buttons ( This has basically nothing to do with Zope. Either you use client-side Javascript to ask for confirmation or you submit to dedicated from asking the user for yes/no..that's trivial HTML. -aj pgpJTpQaZHMqy.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a warning message before performing an action
- Original Message - From: "Alan" <[EMAIL PROTECTED]> To: Sent: Thursday, June 14, 2007 11:18 AM Subject: [Zope] a warning message before performing an action I have a web page with some buttons ( This could be done via a confirmation form served from zope, but it would be easier/cleaner if you used javascript to pop-up the yes/no window and then use javascript to submit the 'delete' form (or not). Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] a warning message before performing an action
Dears, I have a web page with some buttons (http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Packing the Data.fs with wget fails since 2.9.7
--On 14. Juni 2007 09:35:17 + Maurits van Rees <[EMAIL PROTECTED]> wrote: Hi, This blog entry shows how to use wget to pack the zope database, which you can then put in a cronjob to call each day or week: Write a PythonScript within the ZMI that calls the pack operation. Then call *this* script through wget. -aj pgppT8wBvrFRX.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Packing the Data.fs with wget fails since 2.9.7
Hi, This blog entry shows how to use wget to pack the zope database, which you can then put in a cronjob to call each day or week: http://blogs.translucentcode.org/mick/2004/03/10/using_wget_to_pack_zope/ It is just one line: wget -q http://username:[EMAIL PROTECTED]:8080/Control_Panel/Database/manage_pack?days:float=0 But as a comment on that blog shows: this does not work anymore. Zope now requires that you visit that form using POST, which is not what wget is doing automatically. So you get an error in your event.log like this: 2007-06-13T18:43:41 ERROR Zope.SiteErrorLog http://localhost:9080/Control_Panel/Database/manage_pack Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module , line 3, in _facade Module AccessControl.requestmethod, line 52, in _curried Forbidden: Request must be POST I have tried adding POST data to the wget call. Then you get this and other variations: wget -q --post-data='days:float=1&submit=Pack' \ http://user:[EMAIL PROTECTED]:8080/Control_Panel/Database/manage_pack But that gives other errors: Unauthorized: Your user account does not have the required permission. Access to 'title_or_id' of (DatabaseChooser at /Control_Panel/Database) denied. Your user account, Anonymous User, exists at (unknown). Access requires one of the following roles: ['Manager']. Your roles in this context are ['Anonymous']. For zeo I could use the bin/zeopack.py from the zope software home, but not for non-zeo zope servers. Does anybody know a solution? -- Maurits van Rees | http://maurits.vanrees.org/ [NL] Work | http://zestsoftware.nl/ "Do not worry about your difficulties in computers, I can assure you mine are still greater." ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: 2.9.7 build fails: 'build/lib/linux-i686-2/5/pytz/zoneinfo/Antarctica' does not exist
Maurits van Rees wrote: > Mikko Ohtamaa, on 2007-06-13: error: package directory 'build/lib/linux-i686-2/5/pytz/zoneinfo/Antarctica' does not exist make: *** [build] Error 1 Looks like there was python2.5-dev installed (7.04 Feisty Fawn default) though python2.4-dev was required. apt-get install python2.4-dev solved the problem once for all. -- Mikko Ohtamaa Associate, Red Innovation Ltd. +358 40 743 9707 www.redinnovation.com begin:vcard fn:Mikko Ohtamaa n:Ohtamaa;Mikko org:Red Innovation Ltd. adr:;;;Oulu;;;Finland email;internet:[EMAIL PROTECTED] title:CEO tel;cell:+358 40 743 9707 url:http://www.redinnovation.com version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )