mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: do not allow posting of category topic template without any changes
This commit is contained in:
parent
b282c893b2
commit
671ffc4e06
@ -358,6 +358,17 @@ const Composer = RestModel.extend({
|
||||
}
|
||||
}
|
||||
|
||||
if (topicFirstPost) {
|
||||
// user should modify topic template
|
||||
const category = this.category;
|
||||
if (category && category.topic_template) {
|
||||
if (this.reply.trim() === category.topic_template.trim()) {
|
||||
bootbox.alert(I18n.t("composer.error.topic_template_not_modified"))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.privateMessage) {
|
||||
// need at least one user when sending a PM
|
||||
return (
|
||||
|
@ -1626,6 +1626,7 @@ en:
|
||||
try_like: "Have you tried the {{heart}} button?"
|
||||
category_missing: "You must choose a category"
|
||||
tags_missing: "You must choose at least {{count}} tags"
|
||||
topic_template_not_modified: "You have not modified the topic template. Please update the topic."
|
||||
|
||||
save_edit: "Save Edit"
|
||||
overwrite_edit: "Overwrite Edit"
|
||||
|
Loading…
Reference in New Issue
Block a user