Big difference between Carter and Trump. Carter levied the restrictions to a specific group that could be readily identified (Iranian citizens) until a specific goal was achieved (release of the hostages). 

Trump wants to ban Muslims (hard to identify objectively and conclusively) until "we figure out what's going on" which in Trump's case is maybe never.