Skip to content

Commit

Permalink
Fixed issue #16862: Not possible to batch-edit owners for Central Par…
Browse files Browse the repository at this point in the history
…ticipant database (#1678)

* Fixed issue #16862: Not possible to batch-edit owners for Central Participant database

The Participant::getOwnerOptions() method was fixed to return an empty list

* Fixed issue #16862: Not possible to batch-edit owners for Central Participant database

Extra fix on the results modal.
- Header for the first column was wrong.
- Also, using the right view now. (Very similars, that's why it didn't showed up)
  • Loading branch information
gabrieljenik committed Dec 21, 2020
1 parent 55611ef commit ae7b048
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -658,7 +658,7 @@ public function batchEdit()
$aResults['global']['message'] = gT('Nothing to update');
}

Yii::app()->getController()->renderPartial('/admin/surveymenu/massive_action/_update_results', array('aResults'=>$aResults));
Yii::app()->getController()->renderPartial('/admin/participants/massive_actions/_update_results', array('aResults'=>$aResults));

}

Expand Down
6 changes: 3 additions & 3 deletions application/models/Participant.php
Expand Up @@ -2203,9 +2203,9 @@ public function getLanguageOptions(){
});
return $returner;
}
public function getOwnerOptions(){

return [];
public function getOwnerOptions()
{
return CHtml::listData(User::model()->findAll(),'uid','full_name');
}

/**
Expand Down
Expand Up @@ -34,7 +34,7 @@
</div>
<label class="col-sm-3 control-label" for='owner_uid'><?php eT("Owner?"); ?></label>
<div class="col-sm-8">
<?php echo TbHtml::dropDownList('owner_uid', 'lskeep', array_merge(['lskeep' => gT('Keep old value')], $model->getOwnerOptions()), ['disabled'=>'disabled','class'=>'custom-data selector_submitField'] );?>
<?php echo TbHtml::dropDownList('owner_uid', 'lskeep', ['lskeep' => gT('Keep old value')] + $model->getOwnerOptions(), ['disabled'=>'disabled','class'=>'custom-data selector_submitField'] );?>
</div>
</div>
<?php } ?>
Expand Down
Expand Up @@ -14,7 +14,7 @@
<?php unset($aResults['global']); ?>
<table class="table table-striped">
<thead>
<th><?php eT('Survey menu entry ID');?></th>
<th><?php eT('Participant ID');?></th>
<th><?php eT('Status');?></th>
</thead>
<tbody>
Expand Down

0 comments on commit ae7b048

Please sign in to comment.