Node.js based forum software built for the modern web
discard language string
barisusaklic296aaeb8adf
diff --git a/public/language/en_GB/modules.json b/public/language/en_GB/modules.jsonindex 88a787af4f..5355c97f7b 100644--- a/public/language/en_GB/modules.json+++ b/public/language/en_GB/modules.json@@ -8,5 +8,6 @@"chat.see_all": "See all Chats","composer.user_said_in": "%1 said in %2:\n",- "composer.user_said": "%1 said:\n"+ "composer.user_said": "%1 said:\n",+ "composer.discard": "Are you sure you wish to discard this post?"}\ No newline at end of filediff --git a/public/src/forum/users.js b/public/src/forum/users.jsindex 589d88ba34..71767b15c9 100644--- a/public/src/forum/users.js+++ b/public/src/forum/users.js@@ -63,8 +63,6 @@ define('forum/users', function() {return;}--ajaxify.loadTemplate('users', function(usersTemplate) {var html = templates.parse(templates.getBlock(usersTemplate, 'users'), data);diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex a58dc5920e..ea028edb00 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -237,15 +237,18 @@ define('composer', dependencies, function(taskbar, controls, uploads, formatting});postContainer.on('click', '.action-bar button[data-action="discard"]', function() {- if (composer.posts[post_uuid].modified) {- bootbox.confirm('Are you sure you wish to discard this post?', function(confirm) {+ if (!composer.posts[post_uuid].modified) {+ discard(post_uuid);+ return;+ }++ translator.translate('[[modules:composer.discard]]', function(translated) {+ bootbox.confirm(translated, function(confirm) {if (confirm) {discard(post_uuid);}});- } else {- discard(post_uuid);- }+ });});postContainer.find('.nav-tabs a').click(function (e) {