コード例 #1
0
<h2> Change password </h2>
<?php 
use components\web\widgets\Form;
$model = new \models\forms\ChangePasswordForm();
?>
<div class="start-page-cont" style="padding: 15px;">
    <?php 
$form = Form::widget(['options' => ['template' => '
                    <div style="padding-top: 10px; background-color: ;">
                        <div>{label}</div>
                        <div style="margin-top: 5px;">{input}</div>
                        <div style="margin-top: 5px; color: red;">{error}</div>
                    </div>
                ']]);
$form->input('password', $model, 'oldPassword', ['attrs' => ['class' => 'form-inp', 'style' => 'padding-top: 10px;']])->input('password', $model, 'newPassword', ['attrs' => ['class' => 'form-inp']])->input('password', $model, 'confirmPassword', ['attrs' => ['class' => 'form-inp']]);
?>
    <div style="padding-top: 10px;">
        <input type="submit" value="change password" class="submit-btn">
    </div>
<?php 
echo $form->endForm();
?>
</div>
コード例 #2
0
ファイル: signUp.php プロジェクト: zivanof/fun_project
        <i class="fa fa-check-circle"></i>
        <span class="success-msg">You have successfully signed up! <a class="success-link" href="<?php 
    echo \components\UrlManager::to(['site/login']);
    ?>
">Click here</a> login.</span>
    </div>
    <?php 
} else {
    ?>
    <h2 class="header-title">Sign up</h2>
    <div class="start-page-cont">
    <?php 
    $form = Form::widget(['options' => ['template' => '
                        <div class="inp-opt-cont">
                            <div>{label}</div>
                            <div class="inp-cont">{input}</div>
                            <div class="inp-cont-error">{error}</div>
                        </div>
                    ']]);
    $form->input('email', $model, 'email', ['attrs' => ['class' => 'form-inp', 'autocomplete' => 'off']])->input('text', $model, 'username', ['attrs' => ['class' => 'form-inp', 'autocomplete' => 'off']])->input('password', $model, 'password', ['attrs' => ['class' => 'form-inp']]);
    ?>
            <div class="submit-cont">
                <input type="submit" value="sign up" class="submit-btn">
            </div>
            <?php 
    echo $form->endForm();
    ?>
    </div>
    <?php 
}
?>