add vlan dialog

The code would be much more readable if it did not multiplex `bool invalid` and `bool empty` into `err == 2` and err == 1`, respectively.