Fix editing of VRF in web UI

Used the wrong input name.

Also make statistics JS conditional to prevent javascript error.

Fixes #575.