hidden js upgrade for template