Appeals court partially upholds Trump gag order in election interference case