fix(UX): improve server script message (#24770)

This commit is contained in:
Ankush Menat 2024-02-05 19:44:48 +05:30 committed by GitHub
parent 0967cc4f90
commit 1b8e9c3502
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,9 +28,13 @@ frappe.ui.form.on("Server Script", {
check_safe_exec(frm) {
frappe.xcall("frappe.core.doctype.server_script.server_script.enabled").then((enabled) => {
if (enabled === false) {
let docs_link =
"https://frappeframework.com/docs/user/en/desk/scripting/server-script";
let docs = `<a href=${docs_link}>${__("Official Documentation")}</a>`;
frm.dashboard.clear_comment();
let msg = __("Server Scripts feature is not available on this site.") + " ";
msg += __("Please contact your system administrator to enable this feature.");
msg += __("To enable server scripts, read the {0}.", [docs]);
frm.dashboard.add_comment(msg, "yellow", true);
}
});