?> </li> <li class="error_message"><?php echo $form->error($model, 'address'); ?> </li> </ul> </fieldset> <fieldset><legend>Project Features</legend> <ul> <li><span><?php echo $form->labelEx($model, 'ownership_type_id'); ?> </span> <?php echo $form->dropDownList($model, 'ownership_type_id', CHtml::listData(CategoryOwnershipTypes::model()->findAll(), 'id', 'ownership_type'), array('empty' => 'Select', 'class' => 'slctbox')); ?> </li> <li class="error_message"><?php echo $form->error($model, 'ownership_type_id'); ?> </li> </ul> <ul> <li><span><?php echo $form->labelEx($model, 'features'); ?> </span> <?php echo $form->textArea($model, 'features', array('class' => 'txtarea')); ?>
<option value="900000000" class="">90 Crores</option> <option value="1000000000" class="">100 Crores</option> <option value="1000000001" class="">100+ Crores</option> </select> </td> </tr> </table> </div> </li> <li> <h3>Property Features</h3> <div class="acc-section"> <table width="92%" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td><label>Type of Ownership</label> <?php echo $form->dropdownList($modelProject, 'ownership_type_id', CHtml::listData(CategoryOwnershipTypes::model()->findAll(), 'id', 'ownership_type'), array('empty' => 'All')); ?> </td> </tr> <tr> <td><label>Amenities</label><br /> <div class="multi_checkbox med"> <?php $property_type_id = isset($_POST['property_type_id']) ? $_POST['property_type_id'] : null; echo CHtml::checkBoxList('amenity_id', $amenities, CHtml::listData(CategoryAmenities::model()->findAll(), 'id', 'amenity'), array('size' => '5', 'multiple' => 'multiple', 'id' => 'project-amenities-multi')); ?> </div> </td> </tr> </table> </div>
/** * This method returns the ownership type for the given id. * Returns model if successfully found. * Returns false if not found. * * @return model || false */ public static function getOwnershipTypeById($id) { $categoryOwnershipTypes = CategoryOwnershipTypes::model()->findByPk($id); if ($categoryOwnershipTypes) { return $categoryOwnershipTypes->ownership_type; } else { return null; } }
/** * 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 the ID of the model to be loaded */ public function loadModel($id) { $model = CategoryOwnershipTypes::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<tr> <td><label>Transaction Type</label> <?php echo CHtml::activeDropDownList($modelProperty, 'transaction_type_id', CHtml::listData(PropertyTransactionTypes::model()->findAll(), 'id', 'transaction_type'), array('class' => 'select_box', 'empty' => 'All')); ?> </td> </tr> <tr> <td><label>Age Of Construction</label><br /> <?php echo CHtml::activeDropDownList($modelProperty, 'age_of_construction', CHtml::listData(PropertyAgeOfConstruction::model()->findAll(), 'id', 'age'), array('empty' => 'All', 'class' => 'select_box')); ?> </td> </tr> <tr> <td><label>Type of Ownership</label> <?php echo CHtml::activeDropDownList($modelProperty, 'ownership_type_id', CHtml::listData(CategoryOwnershipTypes::model()->findAll(), 'id', 'ownership_type'), array('empty' => 'All', 'class' => 'select_box')); ?> </td> </tr> <tr> <td><label>Amenities</label><br /> <div class="multi_checkbox med"><?php //$amenities = isset($_POST['amenity_id'])? $_POST['amenity_id'] : null; echo CHtml::activeCheckBoxList($propertyAmenities, 'amenity_id', CHtml::listData(CategoryAmenities::model()->findAll(), 'id', 'amenity'), array('size' => '5', 'multiple' => 'multiple', 'id' => 'amenities-multi')); //echo CHtml::checkBoxList('amenity_id',$amenities,CHtml::listData(CategoryAmenities::model()->findAll(),'id','amenity'),array('size'=>'5','multiple'=>'multiple','id'=>'amenities-multi')); ?> </div> </td> </tr> </table> <?php