Moves button config JS out of helper, into template.