The various cities affected by the provisions of this chapter, shall, immediately upon the taking effect thereof, enact appropriate legislation for carrying this chapter into effect, and the failure upon the part of the duly constituted authorities of any such city so to do shall be considered a violation of this chapter and be punishable as such.