revert: disable attach fields in unsaved child table rows (#31166)

* Revert "fix: move child table checks to within `set_input()`"

This reverts commit e08fb1cff2.

* Revert "fix(attach): fix crash on web page builder"

This reverts commit b0b0a4e36b.

* Revert "fix: don't allow attaching a file to a child table in a new document"

This reverts commit 2fdc94840f.
This commit is contained in:
Akhil Narang 2025-02-07 12:05:51 +05:30 committed by GitHub
parent b7aa8c4a11
commit 5e422640d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}