Added body function saveEdits
swap buttons Save and Cancel
Added refresh type select on add new type in saveEdits function