Skip to content

Commit

Permalink
Dev #T636b: Not clear how to edit a question comparing LS3 with LS4 (#…
Browse files Browse the repository at this point in the history
…1919)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Jun 15, 2021
1 parent 34aa11f commit f5cbc57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 46 deletions.
Expand Up @@ -9,52 +9,14 @@
<?php if($hasSurveyContentReadPermission): ?>
<a class="btn btn-default pjax" href="<?php echo Yii::App()->createUrl("admin/expressions/sa/survey_logic_file/sid/{$surveyid}/gid/{$gid}/"); ?>" role="button">
<span class="icon-expressionmanagercheck"></span>
<?php eT("Check survey logic for current question group"); ?>
<?php eT("Check logic"); ?>
</a>
<?php endif; ?>

<?php if($hasSurveyContentDeletePermission):?>

<!-- Delete -->
<?php if( $oSurvey->active != "Y" ):?>
<?php if($oSurvey->groupsCount == 1): ?>
<!-- can't delete the only group in a survey -->
<button type="button" class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("Cannot delete this group because it's the only group in the survey."); ?>" >
<span class="fa fa-trash"></span>
<?php eT("Delete group"); ?>
</button>
<?php elseif(is_null($condarray)):?>
<!-- can delete group and question -->
<button
class="btn btn-danger"
data-toggle="modal"
data-target="#confirmation-modal"
data-onclick='(function() { <?php echo convertGETtoPOST(Yii::app()->createUrl("questionGroupsAdministration/delete/", ["asJson" => true, "surveyid" => $surveyid, "gid"=>$gid])); ?> })'
data-message="<?php eT("Deleting this group will also delete any questions and answers it contains. Are you sure you want to continue?","js"); ?>"
>
<span class="fa fa-trash"></span>
<?php eT("Delete group"); ?>
</button>
<?php else: ?>
<!-- there is at least one question having a condition on its content -->
<button type="button" class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("Impossible to delete this group because there is at least one question having a condition on its content"); ?>" >
<span class="fa fa-trash"></span>
<?php eT("Delete group"); ?>
</a>
<?php endif; ?>
<?php else:?>
<!-- Activated -->
<button type="button" class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("You can't delete this question group because the survey is currently active."); ?>" >
<span class="fa fa-trash"></span>
<?php eT("Delete group"); ?>
</button>
<?php endif; ?>
<?php endif; ?>

<?php if($hasSurveyContentExportPermission):?>
<!-- Export -->
<a class="btn btn-default " href="<?php echo Yii::App()->createUrl("admin/export/sa/group/surveyid/$surveyid/gid/$gid");?>" role="button">
<span class="icon-export"></span>
<?php eT("Export this question group"); ?>
<?php eT("Export"); ?>
</a>
<?php endif; ?>
Expand Up @@ -9,23 +9,23 @@
<?php if($hasSurveyContentUpdatePermission): ?>
<a class="btn btn-success pjax" href="<?php echo Yii::App()->createUrl("questionGroupsAdministration/edit/surveyid/{$surveyid}/gid/{$gid}/"); ?>" role="button">
<span class="icon-edit"></span>
<?php eT("Edit question group");?>
<?php eT("Edit");?>
</a>
<?php endif; ?>

<!-- Check survey logic -->
<?php if($hasSurveyContentReadPermission): ?>
<a class="btn btn-default pjax" href="<?php echo Yii::App()->createUrl("admin/expressions/sa/survey_logic_file/sid/{$surveyid}/gid/{$gid}/"); ?>" role="button">
<span class="icon-expressionmanagercheck"></span>
<?php eT("Check question group logic"); ?>
<?php eT("Check logic"); ?>
</a>
<?php endif; ?>

<?php if($hasSurveyContentExportPermission):?>
<!-- Export -->
<a class="btn btn-default " href="<?php echo Yii::App()->createUrl("admin/export/sa/group/surveyid/$surveyid/gid/$gid");?>" role="button">
<span class="icon-export"></span>
<?php eT("Export question group"); ?>
<?php eT("Export"); ?>
</a>
<?php endif; ?>

Expand All @@ -42,20 +42,20 @@ class="btn btn-danger"
data-message="<?php eT("Deleting this group will also delete any questions and answers it contains. Are you sure you want to continue?","js"); ?>"
>
<span class="fa fa-trash"></span>
<?php eT("Delete question group"); ?>
<?php eT("Delete"); ?>
</button>
<?php else: ?>
<!-- there is at least one question having a condition on its content -->
<button type="button" class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("Impossible to delete this group because there is at least one question having a condition on its content"); ?>" >
<span class="fa fa-trash"></span>
<?php eT("Delete question group"); ?>
<?php eT("Delete"); ?>
</a>
<?php endif; ?>
<?php else:?>
<!-- Activated -->
<button type="button" class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("You can't delete this question group because the survey is currently active."); ?>" >
<span class="fa fa-trash"></span>
<?php eT("Delete question group"); ?>
<?php eT("Delete"); ?>
</button>
<?php endif; ?>
<?php endif; ?>

0 comments on commit f5cbc57

Please sign in to comment.