Skip to content

Commit

Permalink
Dev: Add participant to survey, massive action (CPDB)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 23, 2016
1 parent 6822ae1 commit d68b398
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/views/admin/participants/attributeMap_view.php
Expand Up @@ -2,7 +2,7 @@
var redUrl = "<?php echo $this->createUrl("/admin/participants/sa/displayParticipants"); ?>";
var surveyId = "<?php echo $survey_id ?>";
var redirect = "<?php echo $redirect ?>";
if(redirect=='TRUE')
if(redirect == 'on')
{
redUrl = "<?php echo $this->createUrl("/admin/tokens/sa/browse/surveyid/{$survey_id}"); ?>";
}
Expand Down
Expand Up @@ -78,7 +78,7 @@
'grid-reload' => 'no',

'actionType' => 'custom',
'custom-js' => '(function(itemIds) {})'
'custom-js' => '(function(itemIds) { LS.CPDB.addParticipantToSurvey(itemIds); })'
)
)
));
Expand Down
11 changes: 6 additions & 5 deletions scripts/admin/participantpanel.js
Expand Up @@ -365,14 +365,14 @@ LS.CPDB = (function() {
*/
addParticipantToSurvey = function(participantIds) {
var data = {
modalTarget: 'addParticipantToSurvey',
participantIds: participantIds
modalTarget: 'addToSurvey',
participant_id: participantIds.join(',')
};
runBaseModal(
openModalParticipantPanel,
data,
'action_save_modal_shareparticipant',
'shareParticipantActiveForm',
'action_save_modal_addToSurvey',
'addToSurveyActiveForm',
'list_central_participants'
);
},
Expand Down Expand Up @@ -403,7 +403,8 @@ LS.CPDB = (function() {
sharePanel: sharePanel,
onClickExport: onClickExport,
bindButtons: bindButtons,
shareMassiveAction: shareMassiveAction
shareMassiveAction: shareMassiveAction,
addParticipantToSurvey: addParticipantToSurvey
};

})();
Expand Down

0 comments on commit d68b398

Please sign in to comment.