Save Current Date After Confirm

Hi!

What I’m trying to do is very simple: when I click “Cerrar reclamo” (close claim) and confirm, I want to set “Día Cierre” (closing date) attribute with the current date.

I have this in my view.php:




$this->menu=array(

	array('label'=>'Listar Mis Reclamos', 'url'=>array('index')),

	array('label'=>'Actualizar Reclamo', 'url'=>array('update', 'idReclamo'=>$model->idReclamo, 'cliente_idCliente'=>$model->cliente_idCliente)),

	array('label'=>'Cerrar Reclamo', 'url'=>'close', 

	      'linkOptions'=>array('submit'=>array('index',

	                                           'idReclamo'=>$model->idReclamo, 'cliente_idCliente'=>$model->cliente_idCliente),

									'confirm'=>'¿Está seguro que desea dar por cerrado este Reclamo?')),

...



This is my action in the controller:




public function actionClose($idReclamo, $cliente_idCliente)

	{

		$model=$this->loadModel($idReclamo, $cliente_idCliente);

		

		//What do I need to put here?

		

		$this->saveModel($model);

		$this->redirect(array('view',

	                    'idReclamo'=>$model->idReclamo, 'cliente_idCliente'=>$model->cliente_idCliente));

	}



I don´t know how to update that specific attribute…

I really would apreciate your help!

Thanks

Dear Friend

Put something like this.




$model->closing_date=date('Y/m/d');//It will insert the current date.



Thanks! It works!