convert from templates to twig

this allows dynamic form extend form without having to copy the whole template