echo Html::hiddenInput('id', $model->id); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['descripcion' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Ingrese Descripción...']], 'observaciones' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Ingrese Observaciones...']]]]); echo Html::hiddenInput('action', null, array('id' => 'action')); echo Html::hiddenInput('user_id', Yii::$app->user->id, array('id' => 'user_id')); ?> <?php echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['fechaEntrada' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha de Alta (dd/mm/aaaa)'], 'fechaBaja' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha de Baja (dd/mm/aaaa)']]]); ?> <div> <?php $dataPersona = \yii\helpers\ArrayHelper::map(\app\models\Persona::find()->asArray()->all(), 'id', 'nombre'); $dataTipoPersona = \yii\helpers\ArrayHelper::map(\app\models\TipoPersona::find()->asArray()->all(), 'id', 'nombre'); // $form->field($model, 'nombre', [ // 'hintType' => ActiveField::HINT_SPECIAL, // 'hintSettings' => [ // 'showIcon' => false, // 'title' => '<i class="glyphicon glyphicon-info-sign"></i> Nota' // ] // ])->textInput()->hint('Ingrese el nombre/designación con que se describirá el objeto.'); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['persona_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'label' => 'Persona Donante', 'options' => ['options' => ['placeholder' => 'Seleccione Persona...'], 'data' => $dataPersona, 'pluginOptions' => ['allowClear' => true]]], 'tipoPersona_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['options' => ['placeholder' => 'Seleccione Tipo de Persona...'], 'data' => $dataTipoPersona, 'pluginOptions' => ['allowClear' => true]]]]]); ?> <?php $dataPersonaDonante = \yii\helpers\ArrayHelper::map(\app\models\Persona::find()->asArray()->all(), 'id', 'nombre'); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['persona_id_depositante' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'label' => 'Persona Depositante', 'options' => ['options' => ['placeholder' => 'Seleccione Persona Depositante...'], 'data' => $dataPersona, 'pluginOptions' => ['allowClear' => true]]]]]); ?>
/** * Lists all TipoPersona models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => TipoPersona::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }