The government has abandoned plans to postpone 30 local elections in May following legal advice.