web2py/web2py — pull request #328 by ilvalle (2013-12-13 11:22:03+00:00)
Title: Manage w2p:enable-with in order to reuse form

The current situation doesn't allows a simple html form to be reused.
The submit of a single form (ajax submit) fires several activities which all managed the variable el.data('w2p:enable-with'). Namely, disableElement is called two times, and one time is called disableFormElements.

Due to those several calls the value of el.data('w2p:enable-with') is initially and correctly set to the value of the element but then is re-set to 'working ...' because this latter is the value of the element. When you call enableElement you will find in el.data('w2p:enable-with') 'working ...' instead of the right one.

@niphlod do you agree?