refactor "prevent double submission" js code to not disable submit buttons

if you are going back to a page which contains those disabled buttons, they
stay disabled and clicking them results nothing.  see also #27489

this commit makes sure the forms in page(even if you are going back to it)
could be submitted
Merge branch '4.2/avoid-disabling-submit-buttons' into 4.2-trunk