change time widget in question and questionnaire forms

This commit is contained in:
iIronside
2021-11-02 17:29:15 +03:00
parent 7b8847e1e1
commit f8bacb7b58
23 changed files with 5795 additions and 117 deletions

View File

@ -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);
},
],

View File

@ -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',
],
]) ?>