[Erp5-dev] Dialog forms' submit button malfunction

Jérôme Perrin jerome at nexedi.com
Thu Mar 1 20:18:01 CET 2007


Le Jeudi 1 Mars 2007 16:26, Mikolaj Antoszkiewicz a écrit :
> On some of the dialog forms' the submit button works only once.
> When for example report is generated from report dialog, or exception
> thrown, the button can be pressed but the action doesn't fire anymore.

This is a "feature" :)

When I did this, my goal was to prevent the user from accidentally clicking 
twice on the button, which triggers the action twice. This is a big problem 
for some action dialog, eg. workflow transitions that "remain in state": the 
transition will be passed twice, and if your transition modify a workflow 
variable or execute a script, this will be done twice.

I know this is annoying for developers, for instance when an exception is 
raised in the action, you're not the first one to complain. But for end 
users, it's not a problem (unless they use the "Previous" button from their 
browser).

So this was the original intention, but this implementation is definitivly a 
hack and anyway doesn't work with non javascript-enabled browsers. If it's 
too annoying, I'm ok to revert untill we have a clean solution, and keep this 
change locally on projects which requires it.

Jérome



More information about the Erp5-dev mailing list