adds template field to advanced settings. fixes #1952
fixed tests
Merge pull request #1970 from digi604/fix-1952

Fix #1952