(B) A petition may be filed with the village clerk, signed by registered electors residing in the village equal in number to not less than ten per cent of the total vote cast for all candidates for governor in the village at the most recent general election at which a governor was elected, requesting that the question be placed before the electors whether, instead of the legislative authority appointing legal counsel for the village or for any department or official of the village, the mayor shall appoint an attorney or law firm as the legal counsel with the advice and consent of the legislative authority. Within two weeks after receipt of the petition, the clerk shall certify it to the board of elections, which shall determine its sufficiency and validity. The petition shall be certified to the board not less than ninety days prior to the election at which the question is to be voted upon. At the election, if a majority of the electors of the village approves the question, then effective immediately when the mayor considers it necessary, the mayor shall appoint, with the advice and consent of the legislative authority, an attorney or law firm as legal counsel for the village, or for any department or official of the village, for a period not to exceed two years. The appointment of legal counsel under this division shall be pursuant to a contract approved by the mayor and a majority vote of the legislative authority. The contract shall provide for the compensation and other terms of the engagement of the legal counsel, and the legislative authority shall provide that compensation for the legal counsel.