Well sorry about this but history shows that the phrase "legislating morality" was used fifty years ago by Southern segregationists in opposition to civil rights laws for Black Americans. Some "leftist" movement Orville Faubus and George Wallace had going there.
But this, of course, you knew......