Ejemplo n.º 1
0
use deka6pb\autoparser\models\Posts;
use kartik\file\FileInput;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model deka6pb\autoparser\models\Posts */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="posts-form">
    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'type')->dropDownList(Posts::getTypesAliases(), ['prompt' => '']);
?>

    <?php 
echo $form->field($model, 'text')->textarea(['rows' => 6]);
?>

    <?php 
if (!$model->isNewRecord) {
    ?>
        <?php 
    echo $form->field($model, 'status')->dropDownList(Posts::getStatusAliases(), ['prompt' => '']);
    ?>
    <?php 
}
?>