Example #1
0
 /**
  * @return array
  */
 public static function types()
 {
     return HotelRecord::types();
 }
Example #2
0
<?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();
Example #3
0
    <?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);
?>

        <div class="form-group">
            <div class="input-group">
                <?php 
echo \yii\helpers\Html::submitButton('Применить', array('class' => 'btn btn-warning', 'style' => 'margin-bottom: 9px'));
?>
            </div>
        </div>