fix(UX): warning when printing unsaved documents (#26229)

This commit is contained in:
Ankush Menat 2024-04-30 11:38:58 +05:30 committed by GitHub
parent dd82ab415c
commit 99e4f55940
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1298,6 +1298,15 @@ frappe.ui.form.Form = class FrappeForm {
// ACTIONS
print_doc() {
if (this.is_dirty()) {
frappe.toast({
message: __(
"This document has unsaved changes which might not appear in final PDF. <br> Consider saving the document before printing."
),
indicator: "yellow",
});
}
frappe.route_options = {
frm: this,
};