add/edit group dialog and behavior