adds flash message and overrides confirm alert boxes through modal