(a) At the time of entering a decree dissolving a marriage, the court, upon request of either spouse, shall restore the birth name or former name of such spouse.

(b) At any time after entering a decree dissolving a marriage, the court, upon motion of either spouse, shall modify such judgment and restore the birth name or former name of such spouse. The court shall rule on any motion filed by such spouse to have his or her birth name or former name restored without a hearing.