revert ea15dd8 and add method to attach js event after submitting the form

fixes #300
fix js bug with sonata_type_model add button

fixes #300
Merge pull request #301 from he-li/#300

add method to attach js event after submitting the form