made email template and print popup dynamic