From 5e422640d96b52cd7eee83f5cd400a6294a8e40f Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Fri, 7 Feb 2025 12:05:51 +0530 Subject: [PATCH] revert: disable attach fields in unsaved child table rows (#31166) * Revert "fix: move child table checks to within `set_input()`" This reverts commit e08fb1cff27527b5447c40308a1dd90d81b1411f. * Revert "fix(attach): fix crash on web page builder" This reverts commit b0b0a4e36b3e9e909307d4c67536ddf77b4e79a6. * Revert "fix: don't allow attaching a file to a child table in a new document" This reverts commit 2fdc94840ffe8c5bbab59c24a44105801f57afe6. --- frappe/public/js/frappe/form/controls/attach.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frappe/public/js/frappe/form/controls/attach.js b/frappe/public/js/frappe/form/controls/attach.js index a87bc6583b..6bff5387ec 100644 --- a/frappe/public/js/frappe/form/controls/attach.js +++ b/frappe/public/js/frappe/form/controls/attach.js @@ -119,11 +119,7 @@ frappe.ui.form.ControlAttach = class ControlAttach extends frappe.ui.form.Contro `); } } else { - // Don't allow attaching to child tables for new documents - if (this.doc?.__islocal && this.doc.parent) { - this.$input.prop("disabled", true); - this.$input.attr("title", __("Save to enable file upload")); - } + this.$input.toggle(true); this.$value.toggle(false); } }