The toggleSelect extension for Select2 makes possible to unselect items
in a multi-select dropdown by clicking on them; this behaviour should be
enabled in all the multi-select dropdowns used in the server.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
First step of a somewhat testable user management. - I know, the JSON returns are in an ugly format but the JS expects it that way. So let's keep it that way until we have time to fix the JS in the future.
To avoid making a server request every time the dropdown opens, the
whole list of groups are cached (from the last request):
Whenever the user types in a search term it will still send server
requests.