How exactly would this be enforced? If a man doesn't disclose that his partner is pregnant, is he going to be fired? I don't see how it could be legal to do so. How is a partner's / spouse's medical condition any business of an employer?
It gets better, what if you're not with the mother. What if it was a one night stand, or you donated sperm to her as a single parent. What if you're not with her, she told you she was on the pill and it wasn't true. What if you're in a non binary relationship (2 fathers?). What if you adopt a young child.
One night stand? This depends if she knows it was you. If she does, the responsible thing would be to notify you that she was pregnant as a result of that. It gives you time to prepare to help.
If you aren't with the mother, it really would depend on the relationship. Can you not help the mother out by going to the store? Delay your paternity leave until she starts working and keep your child while the mother is at work? Take the child to the doctor and other such things? People deal with this sort of thing with divorce, so I fail to see how this is different. Again, if you wouldnt get parental rights, however, you'd not have paternity benefits.
I suspect they'd handle non binary relationships as they are handled now. If the woman doesn't choose one as a father and the man steps forward and claims the child, they might request a dna test. They already handle such things in courts at the time. The other option is for neither man to be on the birth certificate, nulling their paternity rights... and thus their paternity leave.
Most places have leave for adoption, even if it isn't a young child. I fail to see how this would change at all. It would simply make sure the leave would be for both parents.