Skip to content

Commit

Permalink
Dev: added question template attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 21, 2016
1 parent b8aa9c8 commit bef517b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions application/helpers/questionHelper.php
Expand Up @@ -1549,6 +1549,23 @@ public static function getAttributesDefinitions()
"caption"=>gT('Display type')
);

//\Yii::import('application.model.QuestionTemplate');

$aQuestionTemplates = \QuestionTemplate::getQuestionTemplateList();
//$aQuestionTemplates = new \QuestionTemplate();


self::$attributes["question_template"]=array(
"types"=>"15ABCDEFGHIKLMNOPQRSTUWXYZ!:;|",
'category'=>gT('Display'),
'sortorder'=>100,
'inputtype'=>'singleselect',
'options'=>$aQuestionTemplates,
'default' => "core",
"help"=>gT('Use a customed question template for this question'),
"caption"=>gT('Question template')
);

/**
* New event to allow plugin to add own question attribute (settings)
* Using $event->append('questionAttributes', $questionAttributes);
Expand Down

0 comments on commit bef517b

Please sign in to comment.