convert categories forms code to haml