)); ?> <p class="help-block">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); ?> <?php echo $form->textFieldControlGroup($model,'description',array('span'=>5,'maxlength'=>255)); ?> <?php echo $form->textAreaControlGroup($model,'definition',array('rows'=>6,'span'=>8)); ?> <?php echo $form->textAreaControlGroup($model,'interpretation',array('rows'=>6,'span'=>8)); ?> <?php echo $form->textFieldControlGroup($model,'guid',array('span'=>5,'maxlength'=>7)); ?> <?php echo $form->dropDownListControlGroup($model, 'frequency', TbHtml::listData(Frequency::model()->findAll(),'id','description'));?> <?php echo $form->dropDownListControlGroup($model, 'indicatorUnit', TbHtml::listData(IndicatorUnit::model()->findAll(),'id','abbrev'));?> <?php echo $form->dropDownListControlGroup($model, 'indicatorDataSource', TbHtml::listData(IndicatorDataSource::model()->findAll(),'id','description'));?> <div class="form-actions"> <?php echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array( 'color'=>TbHtml::BUTTON_COLOR_PRIMARY, 'size'=>TbHtml::BUTTON_SIZE_DEFAULT, )); ?> </div> <?php $this->endWidget(); ?> </div><!-- form -->
/** * 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 IndicatorUnit the loaded model * @throws CHttpException */ public function loadModel($id) { $model = IndicatorUnit::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }