<?php
    use artbox\core\models\ChangePassword;
    use yii\bootstrap\ActiveForm;
    use yii\bootstrap\Html;
    use yii\web\View;
    
    /**
     * @var ChangePassword $changePasswordModel
     * @var View           $this
     */
    $form = ActiveForm::begin(
        [
            'action'        => [ 'change-password' ],
            'method'        => 'POST',
            'errorCssClass' => 'has-error bad',
        ]
    );
    echo $form->field(
        $changePasswordModel,
        'oldPassword',
        [
            'options'      => [
                'class' => 'form-group item',
            ],
            'errorOptions' => [
                'class' => 'help-block alert',
            ],
        ]
    )
              ->passwordInput();
    echo $form->field(
        $changePasswordModel,
        'newPassword',
        [
            'options'      => [
                'class' => 'form-group item',
            ],
            'errorOptions' => [
                'class' => 'help-block alert',
            ],
        ]
    )
              ->passwordInput();
    echo $form->field(
        $changePasswordModel,
        'newPasswordRepeat',
        [
            'options'      => [
                'class' => 'form-group item',
            ],
            'errorOptions' => [
                'class' => 'help-block alert',
            ],
        ]
    )
              ->passwordInput();
    echo Html::submitButton(
        \Yii::t('core', 'Submit'),
        [
            'class' => 'btn btn-default',
        ]
    );
    $form::end();
