Use template name as dialog title whenever possible

Change-Id: I4235f6ed68e1f95c4593caa23ada734fb8493426