Skip to content

Commit

Permalink
fix(UX): improve server script message (#24770)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1b8e9c3)
  • Loading branch information
ankush authored and mergify[bot] committed Feb 5, 2024
1 parent 5a0e20b commit 5d88275
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frappe/core/doctype/server_script/server_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 5d88275

Please sign in to comment.