shorter texts
layout fix
set emailtemplate when editing if matching tempalte exists

Fixes #53
fixed handling of typeattributes when editing device