(a) No appointed officer or employee of the city shall in any manner contribute to, participate in, or take part in any election, primary, or any political contests, other than by exercising his or her right to vote; provided, the foregoing prohibition shall apply only to those elections, primaries, or political contests for offices of the city. Any person violating the provisions of this section shall be punishable as for violation of a city ordinance. (b) The mayor or any councilmember during the current term of office of such person, in order to qualify to run for election to an elective municipal office other than that currently held by such person, must first have resigned from the elective office held by such person at least five days prior to the opening of qualification for such election.