From 35f6f8712a90f8d64600f4d8729c93ff1a7a832a Mon Sep 17 00:00:00 2001 From: Maxwell Morais Date: Mon, 9 May 2016 23:46:09 -0300 Subject: [PATCH] Unset `toolbar.current_status` on `disable_save` If the `cur_frm.toolbar.current_status` is not unset, when, `cur_frm.toolbar.enable_save` is called the `Save` button on form is not reloaded! To certify just go to a form, open the browser console and run ``` cur_frm.disable_save(); cur_frm.enable_save(); ``` Without this fix, the button will not released! --- frappe/public/js/legacy/form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/public/js/legacy/form.js b/frappe/public/js/legacy/form.js index e5cdb397be..153696b130 100644 --- a/frappe/public/js/legacy/form.js +++ b/frappe/public/js/legacy/form.js @@ -803,6 +803,7 @@ _f.Frm.prototype.amend_doc = function() { _f.Frm.prototype.disable_save = function() { // IMPORTANT: this function should be called in refresh event this.save_disabled = true; + this.toolbar.current_status = null; this.page.clear_primary_action(); }