much better structure of js for admin forms