<?php use yii\helpers\Html; use yii\helpers\Url; //use yii\widgets\ActiveForm; use kartik\form\ActiveForm; use kartik\select2\Select2; use yii\helpers\ArrayHelper; use app\models\CoOffice; use app\models\MasPrename; $office = new CoOffice(); $prename = new MasPrename(); /* @var $this yii\web\View */ /* @var $model app\models\Masuser */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="masuser-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'formConfig' => ['labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_SMALL]]); ?> <?php echo $form->field($model, 'username')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'password')->passwordInput(['maxlength' => true]); ?>
<?php use yii\helpers\Html; use yii\widgets\DetailView; use app\models\CoOffice; /* @var $this yii\web\View */ /* @var $model app\models\Masuser */ $Cooffice = new CoOffice(); $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'ผู้ใช้งาน', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="masuser-view well" style=" position: relative;"> <h4><i class="fa fa-user"></i> ผู้ใช้งาน <?php echo Html::encode($this->title); ?> </h4> <p style=" position: absolute; top: 20px; right: 15px;"> <?php echo Html::a('<i class="fa fa-pencil fa-2x"></i>', ['update', 'id' => $model->id], ['class' => 'btn btn-success btn-sm']); ?> <?php echo Html::a('<i class="fa fa-trash fa-2x"></i>', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger btn-sm', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]); ?> </p> <hr id="hr"/> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username', 'password', 'name', 'lname', 'card', 'email', 'tel', ['attribute' => 'hospcode', 'label' => 'hospcode', 'format' => 'raw', 'value' => $Cooffice->Pcuname($model->hospcode)], 'create_date']]); ?>