I resigned from work whilst on maternity leave. I'm not sure what the general laws are, but for my workplace I had to notify them six weeks before my return-to-work date whether I would be returning or not. As it was, I had made my decision 3 months before I was due to go back, so out of courtesy I just told them then.

Did you get any documentation outlining your maternity leave conditions that you could refer to?