modal forms fix, move javascript to own file
controller changes for modal forms