save templates when they are sent from UI