Phase-field model for ferromagnetic shape-memory alloys