All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The performance of the prayer in the mosque is one of the clear ways of guidance and one of the reasons of rectifying one’s heart. However, if you did not condition on the employer to let you go to the mosque for prayer during working hours, then he is not obliged to give you permission to go. According to the view that the congregational prayer in the mosque is an obligation, you should leave this job because of this if you do not need it.
As for the issue of the work coinciding with seeking knowledge, then if your work is necessary to spend on yourself or on your children, then your job comes in priority over seeking optional knowledge, but you may use your free time for this purpose. However, if you do not need the work, or that a mall job is enough for you, with which you can continue seeking knowledge, then this is better.
As regards the ruling on working in a solicitors’ office, then if it becomes clear to you that the office defends some clients in things they do not have right to, or that they lie (about them), or use false tricks and guide the clients to this, then it is not permissible to work for them, and the wages that you take from them in return for writing the memos containing these matters is ill-gotten money. in this case, you should estimate this ill-gotten money and get rid of it by spending it in charity.
Also, you should advise the employer to abide by the Sharee’ah rulings in his dealings. For more benefit on the religious conditions for working as a solicitor [in the field of law], please refer to Fatwa 82728.
However, if they do not take your advice, you should leave this job and look for another lawful job.