Added banned tag input prevention

This commit is contained in:
Marcin Kurczewski 2014-11-03 20:48:23 +01:00
parent 752af358df
commit 8f56018140

View file

@ -155,9 +155,14 @@ App.Controls.TagInput = function($underlyingInput) {
flashTagRed(tagName); flashTagRed(tagName);
} else { } else {
beforeTagAdded(tagName, options); beforeTagAdded(tagName, options);
tags.push(tagName);
var $elem = createListElement(tagName); var exportedTag = getExportedTag(tagName);
$tagList.append($elem); if (!exportedTag || !exportedTag.banned) {
tags.push(tagName);
var $elem = createListElement(tagName);
$tagList.append($elem);
}
afterTagAdded(tagName, options); afterTagAdded(tagName, options);
} }
} }