fix(UX): improve server script message (#24770)
This commit is contained in:
parent
0967cc4f90
commit
1b8e9c3502
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue