From 4f965c2ea5aa474eeeded396ee37a637360f618d Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Fri, 2 Nov 2018 17:06:56 +0530 Subject: [PATCH] Social fixes (#6388) * Disable post button on click * Remove redundant code --- frappe/public/js/frappe/social/social_home.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frappe/public/js/frappe/social/social_home.js b/frappe/public/js/frappe/social/social_home.js index d83fca1ba3..b373795af7 100644 --- a/frappe/public/js/frappe/social/social_home.js +++ b/frappe/public/js/frappe/social/social_home.js @@ -42,11 +42,14 @@ frappe.social.post_dialog = new frappe.ui.Dialog({ ], primary_action_label: __('Post'), primary_action: (values) => { + frappe.social.post_dialog.disable_primary_action(); const post = frappe.model.get_new_doc('Post'); post.content = values.content; frappe.db.insert(post).then(() => { frappe.social.post_dialog.clear(); frappe.social.post_dialog.hide(); + }).finally(() => { + frappe.social.post_dialog.enable_primary_action(); }); } });