コード例 #1
0
ファイル: _form.php プロジェクト: ZloyBarsuk/synapsis
                            </div>


                            <div class="col-md-4">
                                <div class="form-group">
                                    <?php 
echo $form->labelEx($model, 'schet_tip');
?>
                                    <?php 
// echo $form->textField($model, 'schet_tip', array('class' => 'form-control'));
?>
                                    <?php 
//echo CHtml::activeDropDownList($model, 'schet_tip', CHtml::listData(TipScheta::model()->findAll(), 'id', 'naimenovanie'), array('empty' => 'Выбор типа счета'));
?>
                                    <?php 
echo $form->dropDownList($model, 'schet_tip', CHtml::listData(TipScheta::model()->findAll(), 'id', 'naimenovanie'), array('empty' => 'Выбор типа счета'));
?>

                                    <?php 
echo $form->error($model, 'schet_tip');
?>
                                </div>
                            </div>


                            <div class="col-md-4">
                                <div class="form-group">
                                    <?php 
echo $form->labelEx($model, 'comment');
?>
                                    <?php 
コード例 #2
0
 /**
  * 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 TipScheta the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = TipScheta::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }