Enable Save btn after deleting attribute from card

Fixes #4095
This commit is contained in:
Francis Lachapelle
2017-03-23 12:48:17 -04:00
parent 2f92484064
commit b7bc59d599
3 changed files with 15 additions and 8 deletions
@@ -21,6 +21,7 @@
vm.categories = {};
vm.userFilterResults = [];
vm.transformCategory = transformCategory;
vm.removeAttribute = removeAttribute;
vm.addOrg = addOrg;
vm.addBirthday = addBirthday;
vm.addScreenName = addScreenName;
@@ -71,6 +72,10 @@
else
return input;
}
function removeAttribute(form, attribute, index) {
vm.card.$delete(attribute, index);
form.$setDirty();
}
function addOrg() {
var i = vm.card.$addOrg({ value: '' });
focus('org_' + i);