Restore fixes for generic name warnings

This commit is contained in:
Quincy Morgan
2019-11-21 11:53:40 -05:00
parent 4297b0d95b
commit 588fa36a3a
+18 -16
View File
@@ -66,22 +66,24 @@ export function validationSuspiciousName() {
reference: showReference,
entityIds: [entityId],
hash: nameKey + '=' + genericName,
fixes: [
new validationIssueFix({
icon: 'iD-operation-delete',
title: t('issues.fix.remove_the_name.title'),
onClick: function(context) {
var entityId = this.issue.entityIds[0];
var entity = context.entity(entityId);
var tags = Object.assign({}, entity.tags); // shallow copy
delete tags[nameKey];
context.perform(
actionChangeTags(entityId, tags),
t('issues.fix.remove_generic_name.annotation')
);
}
})
]
dynamicFixes: function() {
return [
new validationIssueFix({
icon: 'iD-operation-delete',
title: t('issues.fix.remove_the_name.title'),
onClick: function(context) {
var entityId = this.issue.entityIds[0];
var entity = context.entity(entityId);
var tags = Object.assign({}, entity.tags); // shallow copy
delete tags[nameKey];
context.perform(
actionChangeTags(entityId, tags),
t('issues.fix.remove_generic_name.annotation')
);
}
})
];
}
});
function showReference(selection) {