Skip to content

Commit

Permalink
dev: Fixed question selector not remembering the selected option + no…
Browse files Browse the repository at this point in the history
…w respects user vs global setting for selector
  • Loading branch information
mennodekker committed Apr 17, 2013
1 parent ed05ab5 commit 3381eba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions application/controllers/admin/questions.php
Expand Up @@ -796,10 +796,12 @@ public function index($sa, $surveyid, $gid, $qid=null)

if ($activated != "Y")
{
// Prepare selector Class for javascript function : TODO with or without picture
$selectormodeclass = 'full';
if (Yii::app()->session['questionselectormode'] == 'none')
$selectormodeclass = 'none';
// Prepare selector Class for javascript function
if (Yii::app()->session['questionselectormode'] !== 'default') {
$selectormodeclass = Yii::app()->session['questionselectormode'];
} else {
$selectormodeclass = getGlobalSetting('defaultquestionselectormode', 'default');
}

$aData['selectormodeclass'] = $selectormodeclass;
}
Expand Down
Expand Up @@ -138,7 +138,9 @@
'events' => array(
),
'htmlOptions' => array(
'id' => 'question_type'
'id' => 'question_type',
'options' => array(
$eqrow['type']=>array('selected'=>true))
)
));
$script = '$("#question_type option").addClass("questionType");';
Expand Down

0 comments on commit 3381eba

Please sign in to comment.