예제 #1
0
파일: _form.php 프로젝트: dev-lav/htdocs
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'gruposocio-form', 'enableAjaxValidation' => false));
?>

	<p class="help-block">Los campos con <span class="required">*</span> son requeridos.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<?php 
echo $form->textFieldRow($model, 'alias', array('class' => 'span5', 'maxlength' => 50));
?>
        
        
        <?php 
$memberFormConfig = array('elements' => array('numero_socio' => array('type' => 'dropdownlist', 'items' => CHtml::listData(Socio::model()->findAll(), 'numero_socio', 'numero_socio'), 'prompt' => 'Seleccione Numero Socio...')));
$this->widget('ext.multimodelform.MultiModelForm', array('id' => 'id_socio', 'formConfig' => $memberFormConfig, 'model' => $socioG, 'validatedItems' => $validatedMembers, 'data' => $socioG->findAll('grupo_id=:grupo_Id', array(':grupo_Id' => $model->id)), 'addItemText' => 'Agregar + Socio', 'removeText' => 'Borrar'));
?>
        
        
        
        
        

	<div class="form-actions">
		<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Create' : 'Save'));
?>
	</div>

<?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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Socio::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }