Skip to content

Commit

Permalink
Fixed issue #L41-T291: Question Attributes - List DropDown - Remove I…
Browse files Browse the repository at this point in the history
…nput Validation from General Settings.
  • Loading branch information
thedirtypanda committed Feb 11, 2021
1 parent 2af559f commit 7701109
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions application/controllers/QuestionAdministrationController.php
Expand Up @@ -248,14 +248,19 @@ public function renderFormAux(Question $question)
$questionAttributes = $viewData['aQuestionTypeGroups']['single_choice_questions']['questionTypes'];
$questionAttributeFivePointChoice = $questionAttributes[0];

// TODO: Rename $questionAttributeFivePointChoice to general name.
if ($questionAttributeFivePointChoice['title'] === '5 Point Choice' &&
$questionAttributeFivePointChoice['group'] === 'Single choice questions') {

$viewData['generalSettings'] = $this->removeInputValidationFromGeneralSettings($generalSettings);
$viewData['advancedSettings'] = $this->removeOtherCommentMandatoryFromLogicTab($advancedSettings);
}


// Remove Input Validation from general settings inside List (dropdown) question attribute.
$questionAttributeDropDownList = $questionAttributes[3];
if ($questionAttributeDropDownList['title'] === 'List (dropdown)') {
$viewData['generalSettings'] = $this->removeInputValidationFromGeneralSettings($generalSettings);
}

$this->aData = array_merge($this->aData, $viewData);

$this->render(
Expand Down

0 comments on commit 7701109

Please sign in to comment.