Skip to content

Commit

Permalink
Fixed issue #6936: CPDB button visible in tokens even if admin has no…
Browse files Browse the repository at this point in the history
… permission to access CPDB
  • Loading branch information
c-schmitz committed Dec 5, 2012
1 parent f2eecf9 commit bb6994a
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions application/views/admin/token/browse.php
Expand Up @@ -164,25 +164,28 @@ function sendPost(myaction,checkcode,arrayparam,arrayval)
</div>
<br/>
<table id="displaytokens"></table> <div id="pager"></div>
<p><input type='button' name='addtocpdb' id='addtocpdb' value='<?php $clang->eT("Add participants to central database");?>'/><br />
<div id="addcpdb" title="addsurvey" style="display:none">
<p><?php $clang->eT("Please select the attributes that are to be added to the central database"); ?></p>
<p>
<select id="attributeid" name="attributeid" multiple="multiple">
<?php
if(!empty($attrfieldnames))
{
foreach($attrfieldnames as $key=>$value)

<?php if (hasGlobalPermission('USER_RIGHT_PARTICIPANT_PANEL')) { ?>
<p><input type='button' name='addtocpdb' id='addtocpdb' value='<?php $clang->eT("Add participants to central database");?>'/><br /></p>
<div id="addcpdb" title="addsurvey" style="display:none">
<p><?php $clang->eT("Please select the attributes that are to be added to the central database"); ?></p>
<p>
<select id="attributeid" name="attributeid" multiple="multiple">
<?php
if(!empty($attrfieldnames))
{
echo "<option value='".$key."'>".$value."</option>";
foreach($attrfieldnames as $key=>$value)
{
echo "<option value='".$key."'>".$value."</option>";
}
}
}

?>
</select>
</p>
?>
</select>
</p>

</div>
</div>
<?php } ?>
</div>


Expand Down

0 comments on commit bb6994a

Please sign in to comment.