jquery bug fixes / refactoring jquery + erb/routes

This was changed to a partial. Some people prefer to make all forms as partials.

If it's not reused, at least the code is much cleaner.