/** * 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 PasswordStatuses the loaded model * @throws CHttpException */ public function loadModel($id) { $model = PasswordStatuses::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
echo $form->labelEx($model, 'passwordAttempts'); ?> <?php echo $form->textField($model, 'passwordAttempts'); ?> <?php echo $form->error($model, 'passwordAttempts'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'passwordStatusID'); ?> <?php echo CHtml::activeDropDownList($model, 'passwordStatusID', Chtml::listData(PasswordStatuses::model()->findAll(), 'passwordStatusID', 'passwordStatus'), array('empty' => 'Select a Orgnization')); ?> <?php echo $form->error($model, 'passwordStatusID'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?> </div> <?php $this->endWidget(); ?>