we already have a similar checkbox function in application.js, might make sense to refactor it so its reusable instead of adding another one here.
search for #check_all_roles