Maternity benefit

Hi Sir/Madam, My wife is working in a small IT firm for more than a year consisting of more than 30 members. Now she is in her 8th month pregnancy. During her 6th month pregnancy, doctor had advised her to take bed rest due to medical condition. During that time, her employer has given 2 months loss of pay leaves with a conditions that he can only give 4 month maternity leaves with 50% salary and if fail to rejoin after 4 months(maternity leaves) will be treated as relieved from the service. My wife has given email consent to the conditions, without knowledge of maternity benefits. I know that 6 months full paid leaves has to be given by employer. I wanted to know whether she can ask for 6 months paid leaves now? If employer does not agree, what are the options available for me? Will the email consent become draw back for legal procedures? My wife is afraid to go for legal as she thinks she has to go to court multiple times. She is upset with these things and she is saying she will quit the job post pregnancy (after maternity leave) due to the unfair treatment of employer. Therefore, I also wanted to know the actions/consequences employer could take if she resigns after completion of her maternity leaves.