add template submit and its function in root.py