Example #1
0
echo CHtml::submitButton('Знайти!', array('onclick' => $onclick, 'class' => 'button navy', 'style' => 'width: 150px;'));
?>
                    </li>

                    <a style="display: block; float: left; margin-top: 5px; margin-left: 15px"
                       href="#"
                       onclick="return toggleAdvanced( this )">
                        <span class="icon-plus-1" id="indicator"></span> Розширений пошук
                    </a>

                    <div class="clear"></div>

                    <div style="display: none;" id="advanced-options">
                        <li class="form-row text-input-row" style="display: block; float: left;">
                            <?php 
echo $form->dropDownList($model, 'companion_id', TripCompanion::getOptions('Кого шукаємо?'), array('class' => 'text-input', 'style' => 'width: 150px;'));
?>
                        </li>

                        <li class="form-row text-input-row" style="display: block; float: left; margin-left: 15px;">
                            <?php 
echo $form->dropDownList($model, 'owner_age', User::getAgesForFilter('Вік супутника'), array('class' => 'text-input', 'style' => 'width: 150px;'));
?>
                        </li>

                        <li class="form-row text-input-row" style="display: block; float: left; margin-left: 15px;">
                            <?php 
echo $form->dropDownList($model, 'start_at', Trip::getStartPeriods('Коли їдемо?'), array('class' => 'text-input', 'style' => 'width: 150px;'));
?>
                        </li>
                    </div>
Example #2
0
 public static function getFiltersForListGrid()
 {
     return array('country_id' => Country::getOptions('країна'), 'purpose_id' => TripPurpose::getOptions('ціль'), 'with_id' => TripWith::getOptions('з ким'), 'companion_id' => TripCompanion::getOptions('шукає'));
 }
 public function actionCreateUpdateTrip($id = NULL)
 {
     $model = new TripForm();
     $this->setAjaxResponseSuccessMessage('Поїздка запланована');
     $this->setRedirectUrl($this->createUrl('myTrips'));
     $this->breadcrumbs = array('Головна' => $this->createUrl('site/index'), 'Туристичні знайомства' => $this->createUrl('index'), 'Мої поїздки' => $this->createUrl('myTrips'), 'Планування поїздку');
     if ($id) {
         $this->breadcrumbs = array('Головна' => $this->createUrl('site/index'), 'Туристичні знайомства' => $this->createUrl('index'), 'Мої поїздки' => $this->createUrl('myTrips'), 'Редагування поїздки');
         $this->setAjaxResponseSuccessMessage('Зміни збережені');
         $model->load($id);
     }
     $this->setModel($model);
     if (isPostOrAjaxRequest()) {
         $this->process();
     }
     $this->render('add-edit-trip', array('model' => $this->getModel(), 'purposeOptions' => TripPurpose::getOptions('Для'), 'withOptions' => TripWith::getOptions('Їду з'), 'companionOptions' => TripCompanion::getOptions('Шукаю'), 'countryOptions' => Country::getOptions('Їду в')));
 }