Florent Guillaume wrote:
Okay it seems fixed, but I wanted to mention a similar user-experience problem in CMF and workflows in general:
Suppose a user clicks "publish" in the action box, enters his comment and then clicks the "Publish" button. And the re-clicks on the "Publish" button (either because he double-clicked, or because he retried because the process seemed slow). Then the first click will correctly change the object state, and the second click will be unable to "publish" because from the "public" state there is (obviously) no further "publish" transition. So the user will get a message like the one below.
Because I saw that these double-clicks are somewhat frequent in our case, I put a try: except: in content_status_modify.
For one of my applications (not CMF based), I use unique form ids to catch if a form is submitted twice. I also use a bit of javascript to ignore a second click on the "submit" button, which reduces the load on the form-ids manager. I'd post the javascript... but I can't find it just now. It is just a three-liner to set a variable when the button is first clicked, and only allow the submit action to run if the variable is unset. Actually, now that CST is in the Zope core, I should rewrite the form-id manager to take advantage of that. -- Steve Alexander