My client is asking for feedback info when a document is submitted, like 'Your document has been submitted and will be processed shortly". I have a Python Script action Submit button that sends an email with this info to the user but the client want's something immediately visual like the ploneMessage info feature that he's familiar with in plone (eg. Info: Changes saved.").
I could create a view with a custom template with a message place holder and redirect to it to display a message and returning to the came_from url when 'OK' is clicked (like the validation mechanism). But I would prefer something on the form that emulates ploneMessage.
Has anyone done something like this?
How about an event that calls addStatusMessage on the request upon save?
Plomino provides a method to produce Plone messages: writeMessageOnPage
so in your form's onSaveDocument event you can add something like that:
plominoDocument.writeMessageOnPage("It is ok", plominoDocument.REQUEST)
it displays an Info message, and for Error messages, you do that:
plominoDocument.writeMessageOnPage("It is wrong", plominoDocument.REQUEST, error=True)
Ah, should be documented, I added an issue -> https://sourceforge.net/tracker/index.php?func=detail&aid=3020652&group_id=159566&atid=812342#
Thanx Eric, yet another cool feature.