add autosubmit form js with some refactors to ajax_form class