All this code could have gone in a javascript file and the functionality could have been called 'unobtrusively'. Check of UJS and see if you can work through this. We don't need to override the views directly, and this will help in keeping this plugin compatible with multiple versions of redmine.