Catholic teachers end 18 month battle with 'yes' vote