My husband and I have two children but my ex and I share custody of our two children from our previous marriage. The judge ordered me to pay my ex's attorney fees and threatened to have me arrested and take my kids away if I don't come up with $15,000. In 30 days! I, and my attorney, expressed that due to me not working (because of my two children under age 4) I would not be able to pay those fees. He then had me placed me in a holding cell and threatened to send me to jail if I didn't come up with a plan! So because of being under duress, I went back into the court room with my attorney and told the judge that I could afford $50 per month. He was NOT happy but agreed to the $50 per month for 6 consecutive months and at the end of the 6th month, I would have 30 days to pay the balance. In the order, he stated that if I did not comply and pay the full amount by the end of the timeline, that he would place me on home confinement and day report! Is this legal?