'Childcare leave' lawmaker admits to affair