Interpretation of Jahn-Teller phase transitions in mixed crystals using the random-field ising model