Skip to content

Commit

Permalink
Fixed issue #17837: Directly show edit mode: some quirks (#2441)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljenik committed May 31, 2022
1 parent 8522cb1 commit efca172
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Expand Up @@ -585,7 +585,8 @@ public function actionDelete(bool $asJson = false)

LimeExpressionManager::UpgradeConditionsToRelevance($iSurveyId);
$survey = Survey::model()->findByPk($iSurveyId);
if (!empty($survey->groups)) {
$landOnSideMenuTab = Yii::app()->request->getPost('landOnSideMenuTab');
if ($landOnSideMenuTab == 'structure' && !empty($survey->groups)) {
$this->redirect(
Yii::app()->createUrl(
'questionGroupsAdministration/view/',
Expand Down
Expand Up @@ -27,7 +27,17 @@
<a href="#" onclick="return false;"
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-onclick='(function() { <?php echo convertGETtoPOST(
Yii::app()->createUrl(
"questionGroupsAdministration/delete/",
[
"asJson" => true,
"surveyid" => $surveyid,
"gid" => $gid,
"landOnSideMenuTab" => 'structure'
]
)
); ?> })'
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 text-danger"></span>
Expand Down

0 comments on commit efca172

Please sign in to comment.