Skip to content

Commit

Permalink
Revert "dev: disable buttons (copy, questionTypeSelector) when survey…
Browse files Browse the repository at this point in the history
… is active"

This reverts commit 61b791c.
  • Loading branch information
olleharstedt committed May 10, 2021
1 parent fbea563 commit 5de2e6b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
Expand Up @@ -68,7 +68,7 @@
<?php endif; ?>

<!-- Copy -->
<?php if($hasSurveyContentCreatePermission && ($oSurvey->active!='Y')):?>
<?php if($hasSurveyContentCreatePermission):?>
<a class="btn btn-default" id="copy_button" href='<?php echo Yii::App()->createUrl("questionAdministration/copyQuestion/surveyId/{$oQuestion->sid}/questionGroupId/{$oQuestion->gid}/questionId/{$oQuestion->qid}");?>'>
<span class="icon-copy icon"></span>
<?php eT("Copy"); ?>
Expand Down
Expand Up @@ -109,11 +109,6 @@ class PreviewModalWidget extends CWidget
*/
public $debug = false;

/**
* @var bool true if survey is active, in this case questiontype should not be changed (button disabled)
*/
public $survey_active = false;

/**
* @return void
*/
Expand Down
Expand Up @@ -7,11 +7,6 @@ class="btn btn-block btn-primary"
data-toggle="modal"
aria-haspopup="true"
aria-expanded="false"
<?php
if ($this->survey_active) {
echo 'disabled';
}
?>
>
<?php if ($this->iconPosition === 'front') : ?>
<i class="fa fa-folder-open"></i>&nbsp;&nbsp;
Expand Down
1 change: 0 additions & 1 deletion application/views/questionAdministration/codeAndType.php
Expand Up @@ -19,7 +19,6 @@
'renderType' => isset($selectormodeclass) && $selectormodeclass == "none" ? "group-simple" : "group-modal",
'modalTitle' => gT("Select question type"),
'groupTitleKey' => "questionGroupName",
'survey_active' => $question->survey->active,
'groupItemsKey' => "questionTypes",
'debugKeyCheck' => gT("Type:") . " ",
'previewWindowTitle' => gT("Preview question type"),
Expand Down

0 comments on commit 5de2e6b

Please sign in to comment.