Files
SmartHomePHP/modules/admin/views/user/_form.php
Alex Solomaha c021d959dd Refactor
2016-10-21 16:03:14 +03:00

35 lines
849 B
PHP

<?php
/* @var $this yii\web\View */
/* @var $model app\models\User */
/* @var $form yii\widgets\ActiveForm */
use app\models\User;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
?>
<div class="user-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'username')->textInput() ?>
<?= $form->field($model, 'email')->input('email') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<?= $form->field($model, 'status')->dropDownList(User::getStatusesArray()) ?>
<?= $form->field($model, 'api_key')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Добавить' : 'Сохранить', [
'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary'
]) ?>
</div>
<?php ActiveForm::end(); ?>
</div>