Skip to content

Commit

Permalink
Fixed issue #15120: option to import question group is only available…
Browse files Browse the repository at this point in the history
… in "list question groups" not when using "add question group"
  • Loading branch information
ptelu committed Aug 12, 2019
1 parent efc3a54 commit 391fe2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/controllers/admin/questiongroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ public function view($surveyid, $gid)
$aData['questiongroupbar']['buttonspreview'] = true;
$aData['questiongroupbar']['savebutton']['form'] = true;
$aData['questiongroupbar']['saveandclosebutton']['form'] = true;
if (sanitize_paranoid_string(App()->request->getParam('sa') == 'add')) {
$aData['questiongroupbar']['importbutton'] = true;
}

///////////
// sidemenu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
<?=gT("Preview question group");?>
</a>
<?php endif; ?>
<?php if (isset($questiongroupbar['importbutton']) && $questiongroupbar['importbutton']): ?>
<a class="btn btn-default" href="<?php echo App()->createUrl('admin/questiongroups/sa/importview/surveyid/' . $surveyid); ?>" role="button">
<span class="icon-import"></span>
<?php eT('Import a group'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif;?>
Expand Down

0 comments on commit 391fe2a

Please sign in to comment.