FEATURE: Watched Words: when posts contain words, do one of flag, require approval, censor, or block

This commit is contained in:
Neil Lalonde
2017-06-28 16:56:44 -04:00
parent 9d774a951a
commit 24cb950432
49 changed files with 1096 additions and 37 deletions

View File

@ -0,0 +1,25 @@
import computed from "ember-addons/ember-computed-decorators";
import UploadMixin from "discourse/mixins/upload";
export default Em.Component.extend(UploadMixin, {
type: 'csv',
classNames: 'watched-words-uploader',
uploadUrl: '/admin/watched_words/upload',
addDisabled: Em.computed.alias("uploading"),
validateUploadedFilesOptions() {
return { csvOnly: true };
},
@computed('actionKey')
data(actionKey) {
return { action_key: actionKey };
},
uploadDone() {
if (this) {
bootbox.alert(I18n.t("admin.watched_words.form.upload_successful"));
this.sendAction("done");
}
}
});