fix: add secondary action for amended documents with tooltip (#38510)

This commit is contained in:
Saqib Ansari 2026-04-09 15:30:03 +05:30 committed by GitHub
parent 4b53fa7409
commit 58618cd0f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -735,6 +735,12 @@ frappe.ui.form.Toolbar = class Toolbar {
.then((is_amended) => {
if (is_amended) {
this.page.clear_actions();
let btn = this.page.set_secondary_action(__("Amend"), () => {});
btn.prop("disabled", true)
.wrap('<span style="display:inline-block"></span>')
.parent()
.attr("title", __("Already amended as {0}", [is_amended]))
.tooltip({ delay: { show: 400, hide: 100 }, trigger: "hover" });
return;
}
this.set_page_actions(status);