Magnetic phase transitions in an electroelastic model for magnetically ordered spin-crossover solids