A phase-field model with temperature dependent constraint