Copy button code from template