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);
} else {
beforeTagAdded(tagName, options);
tags.push(tagName);
var $elem = createListElement(tagName);
$tagList.append($elem);
var exportedTag = getExportedTag(tagName);
if (!exportedTag || !exportedTag.banned) {
tags.push(tagName);
var $elem = createListElement(tagName);
$tagList.append($elem);
}
afterTagAdded(tagName, options);
}
}