wrap template into bootstrap dialog