Skip to content

Commit

Permalink
Add Project Setup Page
Browse files Browse the repository at this point in the history
  • Loading branch information
grezniczek committed Oct 20, 2024
1 parent 6a4075a commit b24ae66
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions JSInjectorExternalModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down Expand Up @@ -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.<br>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.<br>Bumped framework version to 12.
Expand Down
38 changes: 38 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b24ae66

Please sign in to comment.