Created
April 3, 2017 21:11
-
-
Save Hoffs/c3e3e184d5bd78159e89dadfd989be71 to your computer and use it in GitHub Desktop.
HotNeighbour/views/site/register.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $this yii\web\View */ | |
/* @var $form yii\bootstrap\ActiveForm */ | |
/* @var $model app\models\LoginForm */ | |
use yii\helpers\Html; | |
use yii\bootstrap\ActiveForm; | |
$this->title = 'Register'; | |
$this->params['breadcrumbs'][] = $this->title; | |
?> | |
<div class="site-register"> | |
<h1><?= Html::encode($this->title) ?></h1> | |
<p>Please fill out the following fields to register:</p> | |
<?php $form = ActiveForm::begin([ | |
'id' => 'register-form', | |
'layout' => 'horizontal', | |
'fieldConfig' => [ | |
'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-7\">{error}</div>", | |
'labelOptions' => ['class' => 'col-lg-1 control-label'], | |
], | |
]); ?> | |
<?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?> | |
<?= $form->field($model, 'email')->textInput() ?> | |
<?= $form->field($model, 'firstName')->textInput() ?> | |
<?= $form->field($model, 'lastName')->textInput() ?> | |
<?= $form->field($model, 'address')->textInput() ?> | |
<?= $form->field($model, 'gender')->inline()->radioList([ | |
1 => 'Male', | |
2 => 'Female' | |
]) ?> | |
<?= $form->field($model, 'password')->passwordInput() ?> | |
<div class="form-group"> | |
<div class="col-lg-offset-1 col-lg-11"> | |
<?= Html::submitButton('Register', ['class' => 'btn btn-primary btn-register', 'name' => 'register-button']) ?> | |
</div> | |
</div> | |
<?php ActiveForm::end(); ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment