(2) No temporary restraining order or temporary injunction shall be issued except on condition that complainant first files an undertaking with adequate security in an amount to be fixed by the court sufficient to recompense those enjoined for any loss, expense or damage caused by the improvident or erroneous issuance of such order or injunction, including all reasonable costs, together with a reasonable attorney fee at trial and on appeal and expense of defense against the order or against the granting of any injunctive relief sought in the same proceeding and subsequently denied by the court.
(3) The undertaking mentioned in subsection (2) of this section shall be understood to signify an agreement entered into by the complainant and the surety upon which a judgment may be rendered in the same action or proceeding against the complainant and surety, upon a hearing to assess damages of which hearing complainant and surety shall have reasonable notice, the complainant and surety submitting themselves to the jurisdiction of the court for that purpose. This section does not deprive any party having a claim or cause of action under or upon such undertaking from electing to pursue the ordinary remedy of the party by action for legal or equitable remedies. [Amended by 1979 c.284 §188; 1981 c.897 §98]