Files
schuetz3-erpnext/erpnext/public/js/website_theme.js
mergify[bot] 7d3d2eb928 ci: add prettier to pre-commit (backport #40206) (#40362)
* ci: add prettier to pre-commit

(cherry picked from commit 2c16036ef3)

* style: format js files

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-03-11 10:47:18 +05:30

16 lines
446 B
JavaScript

// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt
frappe.ui.form.on("Website Theme", {
validate(frm) {
let theme_scss = frm.doc.theme_scss;
if (
theme_scss &&
theme_scss.includes("frappe/public/scss/website") &&
!theme_scss.includes("erpnext/public/scss/website")
) {
frm.set_value("theme_scss", `${frm.doc.theme_scss}\n@import "erpnext/public/scss/website";`);
}
},
});