Skip to content

Instantly share code, notes, and snippets.

@calcio
Created May 22, 2021 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calcio/9bcb9d3eeb220549831b3127311fd2b8 to your computer and use it in GitHub Desktop.
Save calcio/9bcb9d3eeb220549831b3127311fd2b8 to your computer and use it in GitHub Desktop.
vitrine\modules\admin\views\update.php
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\User */
$this->title = Yii::t('app', 'Update {modelClass}: ', [
'modelClass' => 'User',
]) . $model->username;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->username, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
?>
<div class="user-update">
<h1><?= Html::encode($this->title) ?></h1>
<div class="user-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'username')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'status')->radioList($model->getStatusUser()) ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('app', 'Update'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment