diff --git a/www/protected/controllers/CandidatoController.php b/www/protected/controllers/CandidatoController.php index 0b31382..8c53665 100644 --- a/www/protected/controllers/CandidatoController.php +++ b/www/protected/controllers/CandidatoController.php @@ -160,7 +160,7 @@ class CandidatoController extends Controller } else { Yii::app()->user->setFlash('error', Yii::t('intranet', 'Algún dato del candidato no es válido.')); } - + if (!$foundInvalidChild && $model->save() ) { $masterValues = array ('candidato_id'=>$model->id); diff --git a/www/protected/views/candidato/_form_estado.php b/www/protected/views/candidato/_form_estado.php index 6dadf67..8ca3f27 100644 --- a/www/protected/views/candidato/_form_estado.php +++ b/www/protected/views/candidato/_form_estado.php @@ -23,22 +23,6 @@ echo $form->dropDownList( ?>
- $model->id)), - array( - "data"=>array("id"=>$model->id), - "success"=>"function(data){ - if (data.status == \"failure\") { - alert(\"mal\"); - } else { - alert(\"bien\"); - } - }" - ) -);*/ -?> endWidget(); ?> diff --git a/www/protected/views/candidato/index.php b/www/protected/views/candidato/index.php index d6d6ba5..c58ec49 100644 --- a/www/protected/views/candidato/index.php +++ b/www/protected/views/candidato/index.php @@ -37,12 +37,10 @@ $('.search-form form').submit(function(){ $updateJS = CHtml::ajax( array( 'url' => "js:url", 'data' => "js:form.serialize()", - 'type' => 'post', - 'dataType' => 'json', - 'success' => "function( data ) - { + 'type' => "post", + 'dataType' => "json", + 'success' => "function( data ) { if( data.status == 'failure' ) { - jQuery.blur(div.grid-view); setTimeout( \"jQuery( '#dlg-updateestado' ).dialog( 'close' );\", 1000 ); } else { if( data.status == 'success' ) // Update all grid views on success @@ -66,7 +64,6 @@ function updateEstado( url ) if(!url) { //action = '&action=' + act; url = form.attr( 'action' ); - console.log('url => ' + url); } {$updateJS} }"); @@ -172,13 +169,10 @@ $this->endWidget('zii.widgets.jui.CJuiDialog'); CHtml::encode($data->estado), array("candidato/updateEstado"), array( - "data"=>array("id"=>$data->id), - "success"=>"function(data){ - if (data.status == \"failure\") { - } else { - jQuery(\"#dlg-updateestado\").html(data); - jQuery(\"#dlg-updateestado\").dialog(\"open\"); - } + "data" => array("id" => $data->id), + "success" => "function(data){ + jQuery(\"#dlg-updateestado\").html(data); + jQuery(\"#dlg-updateestado\").dialog(\"open\"); }", ), array(