fix: add secondary action for amended documents with tooltip (#38510)
This commit is contained in:
parent
4b53fa7409
commit
58618cd0f9
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue