Sexual relationships between Capitol Hill lawmakers and their staffers would be explicitly banned under a resolution passed by the House on Tuesday in response to multiple scandals and in the wake of the #MeToo movement.

The resolution would also require that any monetary settlements in alleged sexual misconduct cases be paid by legislators personally, rather than by taxpayers, as has happened numerous times in the past, to the tune of $17m over the last 20 years.

“There is no place for sexual harassment or any type of harassment, period,” Representative Gregg Harper, chairman of the House administration committee, said before the House vote on the bipartisan measure. The bill’s leading champion was Representative Barbara Comstock, a Virginia Republican.

Several members of Congress, including Minnesota senator Al Franken and Michigan congressman John Conyers, both Democrats, have resigned over sexual misconduct allegations. Others, like Texas Republican Blake Farenholt have said they will not seek re-election next year due to similar allegations coming to light.

“This bill empowers survivors,” said congresswoman Jackie Speier, another key sponsor, who called the effort to address the issue a “rare and crucial moment of bipartisanship”.

Under the bill, the Office of Compliance, which enforces workplace standards in Congress, would be tasked with reporting any settlements paid out for sexual misconduct in an online database. It will also conduct a survey during every congressional term to gauge attitudes about sexual harassment among employees.

The legislation was developed over several months during which the House administration committee held hearings, roundtables and meeting with victims.

The bill now goes to the Senate, and if passed there, will head to Donald Trump’s desk and present him with an awkward photo-op. The president himself has been accused by more than a dozen women of sexual assault, including a number of his direct subordinates in business, pageant and TV settings. He has denied all the allegations.