Luminescence study of the phase transitions in Mn-doped Cs2CdI4 and Rb2CdI4 single crystals