Skip to content

Commit

Permalink
#954 Improve the confirmation dialog message
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Sep 4, 2019
1 parent d219cb0 commit ba0f41d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ui/app/scripts/controllers/admin/AdminCustomFieldsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@
];

if(usage.case) {
segs.push('<li>' + usage.case + ' cases</li>');
segs.push('<li>' + usage.case + ' ' + (usage.case > 1 ? 'cases' : 'case') + '</li>');
}

if(usage.alert) {
segs.push('<li>' + usage.alert + ' alerts</li>');
segs.push('<li>' + usage.alert + ' ' + (usage.alert > 1 ? 'alerts' : 'alert') + '</li>');
}

if(usage.caseTemplate) {
segs.push('<li>' + usage.caseTemplate + ' case templates</li>');
segs.push('<li>' + usage.caseTemplate + ' case ' + ' ' + (usage.caseTemplate > 1 ? 'templates' : 'template') + '</li>');
}

segs.push('</ul>');
Expand All @@ -109,13 +109,16 @@
isHtml: isHtml
});
})
.then(function(response) {
.then(function(/*response*/) {
return CustomFieldsSrv.removeField(customField);
})
.then(function() {
self.initCustomfields();
CustomFieldsCacheSrv.clearCache();
$scope.$emit('custom-fields:refresh');
})
.catch(function(err) {
console.log(err);
});
};

Expand Down

0 comments on commit ba0f41d

Please sign in to comment.