Skip to content

Commit

Permalink
dev: moved delete button in questionoverview topbar to left side
Browse files Browse the repository at this point in the history
  • Loading branch information
Trischi80 committed Apr 29, 2021
1 parent 63d7928 commit 35083e7
Showing 1 changed file with 21 additions and 21 deletions.
Expand Up @@ -59,26 +59,6 @@
<?php endif; ?>
<?php endif; ?>

<!-- Delete -->
<?php if($hasSurveyContentDeletePermission):?>
<?php if($oSurvey->active!='Y'): ?>
<button class="btn btn-danger"
data-toggle="modal"
data-target="#confirmation-modal"
data-onclick='(function() { <?php echo convertGETtoPOST(Yii::app()->createUrl("questionAdministration/delete/", ["qid" => $qid, "redirectTo" => "groupoverview"])); ?>})'
data-message="<?php eT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?","js"); ?>"
>
<span class="fa fa-trash text-danger"></span>
<?php eT("Delete"); ?>
</button>
<?php else: ?>
<button class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("You can't delete a question if the survey is active."); ?>">
<span class="fa fa-trash text-danger"></span>
<?php eT("Delete"); ?>
</button>
<?php endif; ?>
<?php endif; ?>

<!-- Export -->
<?php if($hasSurveyContentExportPermission):?>
<a class="btn btn-default " href="<?php echo Yii::App()->createUrl("admin/export/sa/question/surveyid/$surveyid/gid/$gid/qid/{$qid}");?>" role="button">
Expand Down Expand Up @@ -124,4 +104,24 @@
<?php eT("Import question"); ?>
</button>
<?php endif; ?>
<?php endif;?>
<?php endif;?>

<!-- Delete -->
<?php if($hasSurveyContentDeletePermission):?>
<?php if($oSurvey->active!='Y'): ?>
<button class="btn btn-danger"
data-toggle="modal"
data-target="#confirmation-modal"
data-onclick='(function() { <?php echo convertGETtoPOST(Yii::app()->createUrl("questionAdministration/delete/", ["qid" => $qid, "redirectTo" => "groupoverview"])); ?>})'
data-message="<?php eT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?","js"); ?>"
>
<span class="fa fa-trash text-danger"></span>
<?php eT("Delete"); ?>
</button>
<?php else: ?>
<button class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("You can't delete a question if the survey is active."); ?>">
<span class="fa fa-trash text-danger"></span>
<?php eT("Delete"); ?>
</button>
<?php endif; ?>
<?php endif; ?>

0 comments on commit 35083e7

Please sign in to comment.