<?php /* @var $model \app\models\country\CountryRecord */ use app\models\hotel\HotelRecord; use app\models\country\CountryRecord; use yii\bootstrap\ActiveForm; $form = ActiveForm::begin(['layout' => 'horizontal']); echo $form->field($model, 'name'); echo $form->field($model, 'description')->textarea(['cols' => 2, 'rows' => 3]); echo $form->field($model, 'type')->dropDownList(HotelRecord::types()); echo $form->field($model, 'stars')->dropDownList(HotelRecord::stars()); echo $form->field($model, 'country_id')->dropDownList(CountryRecord::getCountries()); ?> <div class="clearfix form-actions"> <div class="col-md-offset-3 col-md-9"> <?php echo \yii\bootstrap\Html::submitButton('Применить', ['class' => 'btn btn-success']); ?> </div> </div> <?php ActiveForm::end();
* @var $hotelFilterForm \common\models\hotel\filter\HotelFilterForm * @var $search common\models\tour\TourRecord */ use app\models\country\CountryRecord; use app\models\hotel\HotelRecord; use app\models\tour\TourRecord; ?> <div class="toolbar-2 form-inline"> <?php $form = \yii\widgets\ActiveForm::begin(['method' => 'GET']); ?> <div class="form-group"> <?php echo $form->field($hotelFilterForm, 'country_id')->dropDownList(CountryRecord::getCountries())->label(false); ?> <?php echo $form->field($search, 'hotel_id')->dropDownList(HotelRecord::getHotels())->label(false); ?> <?php echo $form->field($hotelFilterForm, 'stars')->dropDownList(HotelRecord::stars())->label(false); ?> <?php echo $form->field($hotelFilterForm, 'type')->dropDownList(HotelRecord::types())->label(false); ?> <?php echo $form->field($search, 'adults')->dropDownList(TourRecord::adults())->label(false); ?> <?php echo $form->field($search, 'children')->dropDownList(TourRecord::children())->label(false);