beginWidget('bootstrap.widgets.TbActiveForm',array(
'id'=>'solicitud-mp-form',
'enableAjaxValidation'=>false,
//'type'=>'horizontal',
)); ?>
Fields with * are required.
errorSummary($model); ?>
textFieldRow($model,'id_asociado',array('class'=>'span5')); ?>
scenario=='monte_pio_admin'):?>
textFieldRow($model,'fecha_defuncion',array('class'=>'span4','readOnly'=>'readOnly')); ?>
widget('bootstrap.widgets.TbButton', array(
'buttonType'=>'submit',
'type'=>'primary',
'label'=> 'Siguiente',
)); ?>
endWidget(); ?>
clientScript->registerScript('desplegar', '
function buscarAsociado()
{
var cedula=$("#'.CHtml::activeId($model,'cedula_asociado').'").val();
if($.isNumeric(cedula)){
$.ajax({
url:"'.CController::createUrl('/Comun/BuscarAsociado').'",
cache: false,
type: "POST",
dataType: "json",
data: ({cedula:cedula}),
beforeSend: function(xkr){
$("#'.CHtml::activeId($model,'nombre_asociado').'").attr("value","");
$("#'.CHtml::activeId($model,'apellido_asociado').'").attr("value","");
},
success: function(data){
//$.unblockUI();
if(data.nombres!="") {
$("#'.CHtml::activeId($model,'nombre_asociado').'").attr("value",data.nombres);
$("#'.CHtml::activeId($model,'apellido_asociado').'").attr("value",data.apellidos);
}
}
});
}
else{
alert("Cedula debe ser Numerico");
$("#'.CHtml::activeId($model,'nombre_asociado').'").attr("value","");
$("#'.CHtml::activeId($model,'apellido_asociado').'").attr("value","");
}
}
', CClientScript::POS_END);?>