From b24ae669e9d458bc0918eea89278290e8477436c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Rezniczek?= Date: Sun, 20 Oct 2024 10:08:47 +0200 Subject: [PATCH] Add Project Setup Page --- JSInjectorExternalModule.php | 5 +++++ README.md | 2 ++ config.json | 38 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/JSInjectorExternalModule.php b/JSInjectorExternalModule.php index 079daed..9398dcf 100644 --- a/JSInjectorExternalModule.php +++ b/JSInjectorExternalModule.php @@ -59,6 +59,7 @@ function redcap_every_page_top ($project_id = null) { "emailusers" => false, "login" => false, "php" => false, + "psp" => false, "rsd" => false, "aer" => false, "rhp" => false, @@ -168,6 +169,9 @@ function redcap_every_page_top ($project_id = null) { else if ($page == "index.php") { $context["php"] = true; } + else if ($page == "ProjectSetup/index.php") { + $context["psp"] = true; + } else if ($page == "DataEntry/record_status_dashboard.php") { $context["rsd"] = true; } @@ -427,6 +431,7 @@ private function convert_v1_settings() { // Set default contexts $new["proj-context_all"][$i] = false; $new["proj-context_php"][$i] = null; + $new["proj-context_psp"][$i] = null; $new["proj-context_rsd"][$i] = null; $new["proj-context_aer"][$i] = null; $new["proj-context_rhp"][$i] = null; diff --git a/README.md b/README.md index 177f6c0..ecf00e5 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ In a project, go to _Applications > External Modules_ and click the _Configure_ In the configuration dialog, you can define JavaScript snippets for your project that are injected in _All project pages_ or limited to a choice of different project pages, including - _Project Home Page_, +- _Project Setup Page_, - _Record Status Dashboard_, - _Add / Edit Records_, - _Record Home Page_, @@ -85,6 +86,7 @@ The original version of this external module was basically just a modified versi Version | Description ------- | ------------------ +2.2.1 | Added support for new page: Project Setup Page. 2.2.0 | Require EM Framework v14.
Added "enable-every-page-hooks-on-login-form" to config.json. 2.1.1 | Minor code change to prevent a PHP strict mode warning. 2.1.0 | Support for addition all system page: Home, My Projects, New Project, Help & FAQ, Training Videos, Send-It, Sponsor Dashboard.
Bumped framework version to 12. diff --git a/config.json b/config.json index d158b67..cdc9abc 100644 --- a/config.json +++ b/config.json @@ -426,6 +426,25 @@ } ] }, + { + "name": "Project Setup Page", + "key": "sys-proj-context_psp", + "type": "dropdown", + "choices": [ + { + "value": "", + "name": "Not set (on if all is on)" + }, + { + "value": "include", + "name": "Always on" + }, + { + "value": "exclude", + "name": "Always off" + } + ] + }, { "name": "Record Status Dashboard", "key": "sys-proj-context_rsd", @@ -652,6 +671,25 @@ } ] }, + { + "name": "Project Setup Page", + "key": "proj-context_psp", + "type": "dropdown", + "choices": [ + { + "value": "", + "name": "Not set (on if all is on)" + }, + { + "value": "include", + "name": "Always on" + }, + { + "value": "exclude", + "name": "Always off" + } + ] + }, { "name": "Record Status Dashboard", "key": "proj-context_rsd",