示例#1
0
echo CHtml::encode($model->getAttributeLabel('type_id'));
?>
</label>
						<div class="col-md-6 col-xs-12"><?php 
echo CHtml::encode($model->type->name);
?>
</div>
					</div>

					<div class="form-group">
						<label class="col-md-3 col-xs-12 control-label"><?php 
echo CHtml::encode($model->getAttributeLabel('is_internal'));
?>
</label>
						<div class="col-md-6 col-xs-12"><?php 
echo ReferenceTrainingTypes::model()->viewStatus($model->type_id);
?>
</div>
					</div>
					
					<div class="form-group">
						<label class="col-md-3 col-xs-12 control-label"><?php 
echo CHtml::encode($model->getAttributeLabel('topic'));
?>
</label>
						<div class="col-md-6 col-xs-12"><?php 
echo CHtml::encode($model->topic);
?>
</div>
					</div>
					
示例#2
0
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeDropDownList($training, 'type_id', CHtml::listData(ReferenceTrainingTypes::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select'));
?>
						<div id="error_type_id" class="errorMessage"></div>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($training, 'is_internal', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeRadioButtonList($training, 'is_internal', ReferenceTrainingTypes::model()->getStatus(), array('separator' => ' &nbsp; &nbsp; &nbsp; &nbsp; '));
?>
						<div id="error_is_internal" class="errorMessage"></div>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($training, 'topic', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeTextField($training, 'topic', array('maxlength' => 255, 'class' => 'validate[required] form-control'));
?>
						<div id="error_topic" class="errorMessage"></div>
					</div>
 /**
  * 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 ReferenceTrainingTypes the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = ReferenceTrainingTypes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#4
0
						<?php 
echo CHtml::activeDropDownList($model, 'type_id', CHtml::listData(ReferenceTrainingTypes::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select'));
?>
						<?php 
echo CHtml::error($model, 'type_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'is_internal', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeRadioButtonList($model, 'is_internal', ReferenceTrainingTypes::model()->getStatus(), array('class' => 'validate[required] form-control iradio', 'separator' => ' &nbsp; &nbsp; &nbsp; &nbsp; '));
?>
						<?php 
echo CHtml::error($model, 'is_internal');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'topic', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeTextField($model, 'topic', array('maxlength' => 255, 'class' => 'validate[required] form-control'));
?>