To fix #587

Currently we fix the selection field edit template to include span class and each label and input are grouped with a span tag too.