To do it right remove board and unsolder old cords if unusable. Resolder new cords and reinstall board. I'm assuming the wires are soldered to the bottom side of the board.
Alternate method would be to spice, solder, and wrap the old and new cords inside the controller but this is not as good a repair as first method.
Final method would be to get a new electronic controller from online sewing supply
Good Luck
Jon