Beispiel #1
0
?>
                                                                            <?php 
echo $form->error($dogovor_model, 'srok_dni');
?>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-3">
                                                                        <div class="form-group">
                                                                            <?php 
echo $form->labelEx($dogovor_model, 'tip_dney');
?>
                                                                            <?php 
// echo $form->textField($dogovor_model, 'tip_dney', array('class' => 'form-control'));
?>
                                                                            <?php 
echo CHtml::activeDropDownList($dogovor_model, 'tip_dney', Dogovor::enum_days(), array('empty' => 'Выбери тип'));
?>
                                                                            <?php 
echo $form->error($dogovor_model, 'tip_dney');
?>
                                                                        </div>
                                                                    </div>


                                                                    <div class="col-md-3">
                                                                        <div class="form-group">
                                                                            <?php 
echo $form->labelEx($dogovor_model, 'srok_ispolneniya');
?>
                                                                            <?php 
echo $form->dateField($dogovor_model, 'srok_ispolneniya', array('class' => 'form-control'));
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Dogovor the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Dogovor::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }