<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\components\CHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Article */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="panel panel-default">
    <div class="panel-body" style="color:#666;">
    <?php if(Yii::$app->session->hasFlash('error')){?>
    <div class="alert alert-warning" role="alert"><?php echo Yii::$app->session->getFlash('error');?></div>
  <?php }?>
	    <?php $form = ActiveForm::begin([
	    	'id'=>'manager_info',
	        'options'=>['class'=>'form-horizontal'],
	        'fieldConfig' => [  
	            'template' => "{label}\n<div class=\"col-sm-4\">{input}</div>{error}",   
	            'labelOptions'=>['class'=>'col-sm-2 control-label'],
	        ],
	    ]); ?>
    	  <?= $form->field($model, 'admin_username')->textInput() ?>
    	  <?= $form->field($model, 'admin_password')->passwordInput() ?>
    	  <?= $form->field($model, 'admin_password_repeat')->passwordInput() ?>
    	  <?= $form->field($model, 'admin_email')->textInput() ?>
		<?php ActiveForm::end(); ?>
    </div>
</div>
<div class="row button-wrap">
  <div class="col-md-5"></div>
  <div class="col-md-4">
    <input type="button" class="btn btn-danger" value="上一步" onclick="javascript:location.href='<?php echo Yii::$app->urlManager->createUrl(['site/step2']);?>'">
    <input type="button" class="btn btn-primary" id="submit" value="下一步">
  </div>
  <div class="col-md-3"></div>
</div>
<?php
	$this->registerJs('
		$("#submit").click(function(){
			$("#manager_info").submit();
		});
	');
?>
