Added JS to set moderation_flag properly to close #792