moved message flashing markup to its own template