From f9575efaf0b934e2f0f53571bab1d9068c7a13c8 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 1 Sep 2015 12:23:55 -0400 Subject: [PATCH] disable fork button during fork #3535 --- public/src/client/topic/fork.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic/fork.js b/public/src/client/topic/fork.js index 5321202e49..abf03ae526 100644 --- a/public/src/client/topic/fork.js +++ b/public/src/client/topic/fork.js @@ -53,6 +53,7 @@ define('forum/topic/fork', ['components'], function(components) { } function createTopicFromPosts() { + forkCommit.attr('disabled', true); socket.emit('topics.createTopicFromPosts', { title: forkModal.find('#fork-title').val(), pids: pids @@ -62,7 +63,7 @@ define('forum/topic/fork', ['components'], function(components) { $(this).remove(); }); } - + forkCommit.removeAttr('disabled'); if (err) { return app.alertError(err.message); } @@ -116,7 +117,7 @@ define('forum/topic/fork', ['components'], function(components) { } function checkForkButtonEnable() { - if(forkModal.find('#fork-title').length && pids.length) { + if (forkModal.find('#fork-title').length && pids.length) { forkCommit.removeAttr('disabled'); } else { forkCommit.attr('disabled', true);