(c) No sale, foreclosure, or seizure of property for nonpayment of any sum due under any such obligation, or for any other breach of the terms thereof, whether under a power of sale, under a judgment entered upon warrant of attorney to confess judgment contained therein, shall be valid if made during the period of military service or within one year thereafter, except pursuant to an agreement as provided in section 657D-6, unless upon an order previously granted by the court and a return thereto made and approved by the court. Any person who knowingly makes, attempts, or causes to be made any such sale, foreclosure, or seizure of property, shall be guilty of a misdemeanor.