- Actualización del estado de un candidato a través de una ventana modal.
- Actualización framework YII git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@72 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
23e0eb0681
commit
89fd23a7f6
@ -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);
|
||||
|
||||
|
||||
@ -23,22 +23,6 @@ echo $form->dropDownList(
|
||||
?>
|
||||
|
||||
<br clear="all" />
|
||||
<?php
|
||||
//echo CHtml::ajaxSubmitButton(Yii::t('intranet', 'Choose'), "");
|
||||
/*,
|
||||
CHtml::normalizeUrl(array('candidato/update', 'id' => $model->id)),
|
||||
array(
|
||||
"data"=>array("id"=>$model->id),
|
||||
"success"=>"function(data){
|
||||
if (data.status == \"failure\") {
|
||||
alert(\"mal\");
|
||||
} else {
|
||||
alert(\"bien\");
|
||||
}
|
||||
}"
|
||||
)
|
||||
);*/
|
||||
|
||||
?>
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user