Skip to content

Commit

Permalink
Fixed issue #10411: Option Other always visible
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 16, 2016
1 parent 5a23246 commit 46700dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/controllers/admin/questions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,10 @@ function checkconditions(value, name, type, evt_type)
*/
public function ajaxValidate($surveyid,$qid=false){

// Stupid hack since Bootstrap switch is a checkbox and 'other' used to be radio button
// TODO: Longterm, change 'other' to boolean; change the model rules
$_POST['other'] = ( Yii::app()->request->getPost('other') == '1' ) ? 'Y' : 'N' ;

$iSurveyId=$surveyid;
$iQid=$qid;
$oSurvey=Survey::model()->findByPk($surveyid);
Expand Down

0 comments on commit 46700dd

Please sign in to comment.