Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinkc committed Feb 26, 2020
1 parent af67069 commit d79321d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Multilingual.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use ExternalModules\AbstractExternalModule;
use ExternalModules\ExternalModules;
use \Piping as Piping;
use REDCap;

class Multilingual extends AbstractExternalModule
{
Expand All @@ -28,6 +29,9 @@ function redcap_data_entry_form($project_id, $record, $instrument){
function redcap_every_page_top($project_id){
$api_endpoint = $this->getProjectSetting('use-api-endpoint', $project_id);

//$user_rights = REDCap::getUserRights();
//echo json_encode($user_rights);

if(strpos($_SERVER['REQUEST_URI'], 'online_designer.php') !== false && isset($_GET['page'])){
echo '<link rel="stylesheet" type="text/css" href="' . $this->getUrl('css/multilingual.css') . '">';
echo '<script type="text/javascript">' . str_replace('REDCAP_LANGUAGE_VARIABLE', $this->languageVariable($project_id), str_replace('REDCAP_AJAX_URL', $this->getUrl("index.php", true), file_get_contents($this->getModulePath() . 'js/multilingual_setup.js'))) . '</script>';
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"links": {
"project": [
{
"name": "Data Dictionary Support",
"name": "Multilingual Data Dictionary Support",
"icon": "gear",
"url": "dataDictionaryHelper.php"
}
Expand Down
2 changes: 1 addition & 1 deletion js/multilingual_survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
data['project_id'] = pid;
data['record_id'] = $('[name="' + table_pk + '"]').val();
data['event_id'] = event_id;
data['page'] = $('#surveytitle').html().replace(/ /g,'_').toLowerCase();
//data['page'] = $('#surveytitle').html().replace(/ /g,'_').toLowerCase();
var t;
for(t in languages){
if(languages[t] == lang){
Expand Down

0 comments on commit d79321d

Please sign in to comment.