use app\models\Books; /* @var $this yii\web\View */ /* @var $model app\models\BooksSearch */ /* @var $form yii\widgets\ActiveForm */ $options = ['tag' => 'div', 'class' => '']; ?> <div class="books-search"> <?php $form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <div class="row"> <div class="col-md-4"> <?php echo $form->field($model, 'author_id', ['template' => '{input}'])->dropDownList(['' => 'Автор'] + Books::getAuthorList()); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'name', ['template' => '{input}'])->textInput(['placeholder' => 'Название книги']); ?> </div> </div> <div class="row"> <div class="col-md-8"> <div class="row"> <?php echo $form->field($model, 'firstDate', ['template' => '<div class="col-sm-3">{label}</div> <div class="col-sm-3" style="padding: 0">{input}</div>', 'options' => $options])->textInput(['placeholder' => 'дд/мм/гггг']); ?>
?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?//= $form->field($model, 'preview')->textInput(['maxlength' => true]) ?> <?php echo $form->field($model, 'image')->fileInput(); ?> <?php echo $form->field($model, 'date', ['template' => '{label}{input}{error}'])->textInput(['placeholder' => 'дд/мм/гггг']); ?> <?php echo $form->field($model, 'author_id')->dropDownList(['' => 'Автор'] + Books::getAuthorList()); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>