<?php
    use artbox\core\components\imagemanager\components\ImageManagerGetPath;
    use artbox\core\components\imagemanager\components\ImageManagerInputWidget;
    use artbox\core\models\User;
    use artbox\core\models\UserData;
    use yii\bootstrap\ActiveForm;
    use yii\bootstrap\Html;
    use yii\web\View;
    
    /**
     * @var User     $user
     * @var UserData $userData
     * @var View     $this
     */
    $imageSearch = new ImageManagerGetPath(
        [
            'mediaPath' => Yii::getAlias('@storage'),
        ]
    );
?>
<?php
    $form = ActiveForm::begin(
        [
            'action'        => [ 'update' ],
            'method'        => 'POST',
            'errorCssClass' => 'has-error bad',
        ]
    );
    
    
    echo Html::tag(
        'div',
        '',
        [
            'class' => 'clearfix',
        ]
    );
    echo Html::submitButton(
        \Yii::t('core', 'Submit'),
        [
            'class' => 'btn btn-default col-xs-4 col-sm-3 col-md-2 personal_info_submit_button',
        ]
    );
    echo Html::tag(
        'div',
        '',
        [
            'class' => 'clearfix',
        ]
    );
    $form::end();
    echo Html::tag('hr');
    echo Html::tag(
        'p',
        \Yii::t(
            'core',
            'Registered on {date}',
            [
                'date' => \Yii::$app->formatter->asDate($userData->created_at),
            ]
        ),
        [
            'class' => 'small col-xs-6',
        ]
    );
    echo Html::tag(
        'p',
        \Yii::t(
            'core',
            'Last update on {date}',
            [
                'date' => \Yii::$app->formatter->asDatetime($userData->updated_at, 'php:d.m.Y H:i'),
            ]
        ),
        [
            'class' => 'small col-xs-6 text-right',
        ]
    );
