change time widget in question and questionnaire forms
This commit is contained in:
@ -88,29 +88,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'answer_flag',
|
||||
'format' => 'raw',
|
||||
'value' => function ($model) {
|
||||
$answerFlag = $model->answer_flag;
|
||||
|
||||
$class = 'label label-warning';
|
||||
$content = 'Not verified';
|
||||
|
||||
if ($answerFlag > 0)
|
||||
{
|
||||
$class = 'label label-success';
|
||||
$answerFlag < 1 ? $content = $answerFlag *100 . '%' : $content = 'True';
|
||||
}
|
||||
else if ($answerFlag === 0.0)
|
||||
{
|
||||
$class = 'label label-danger';
|
||||
$content = 'Wrong';
|
||||
}
|
||||
|
||||
return Html::tag(
|
||||
'span',
|
||||
$content,
|
||||
[
|
||||
'class' => $class,
|
||||
]
|
||||
);
|
||||
return \common\helpers\AnswerHelper::answerFlagLable($model->answer_flag);
|
||||
},
|
||||
],
|
||||
|
||||
|
@ -54,7 +54,13 @@ function cut_title($str)
|
||||
'response_body',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'answer_flag',
|
||||
[
|
||||
'attribute' => 'answer_flag',
|
||||
'format' => 'raw',
|
||||
'value' => function ($model) {
|
||||
return \common\helpers\AnswerHelper::answerFlagLable($model->answer_flag);
|
||||
},
|
||||
],
|
||||
'user_questionnaires_uuid',
|
||||
],
|
||||
]) ?>
|
||||
|
Reference in New Issue
Block a user