overriding js template function for has many buttons
ditto