Ejemplo n.º 1
0
        <?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>
    </div>
    <?php 
\yii\widgets\ActiveForm::end();
?>
</div>
Ejemplo n.º 2
0
<?php

use common\models\tour\TourRecord;
use yii\bootstrap\ActiveForm;
$form = ActiveForm::begin(['layout' => 'horizontal']);
echo $form->field($model, 'name');
echo $form->field($model, 'hotel_id')->dropDownList(\common\models\hotel\HotelRecord::getHotels());
echo $form->field($model, 'children')->dropDownList(TourRecord::children());
echo $form->field($model, 'adults')->dropDownList(TourRecord::adults());
$clientOptions = ['format' => 'DD.MM.YYYY HH:mm:ss'];
$clientOptions['minDate'] = new \yii\web\JsExpression('moment().format("MM.DD.YYYY")');
$options = ['placeholder' => 'дд.мм.гггг ЧЧ:ММ'];
if ($model->isNewRecord) {
    $options['value'] = Yii::$app->formatter->datetimeFormat;
    $clientOptions['minDate'] = new \yii\web\JsExpression('moment().format("MM.DD.YYYY")');
}
echo $form->field($model, 'flyAt')->widget(\backend\widgets\DateTimePicker::className(), ['options' => $options, 'language' => 'ru', 'clientOptions' => $clientOptions]);
?>

    <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();