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

@ -2,6 +2,7 @@
namespace common\helpers;
use Yii;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
@ -11,13 +12,13 @@ class TimeHelper
{
if ($time_limit === null)
{
return 'Не ограниченоTEST';
return 'Не ограничено';
}
return date("H:i:s", mktime(null, null, $time_limit)) . ' (HH:mm:ss)';
// $date
// return Html::tag('span', $date, ['class' => 'label label-primary']);
return Html::tag(
'span',
Yii::$app->formatter->asDuration(strtotime($time_limit, '0')),
['class' => 'label label-primary']
);
}
}