Fixed those bugs.
Can't use buttons because redmine listens to them and tries to submit the form. So I've used spans instead and changed the cursor to a hand.