Adding attribute 'type' for generated buttons to prevent submit behavior