/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new ActivityGuarantee();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['ActivityGuarantee'])) {
         $model->attributes = $_POST['ActivityGuarantee'];
         if ($model->save()) {
             if (!empty($_POST['yt1'])) {
                 Yii::app()->user->setFlash('activityGuarantee-created', "¡La actividad <b><i>&quot;{$model->description}&quot;</i></b> fue creada exitosamente!");
                 $model = new ActivityGuarantee();
             } else {
                 $this->redirect(array('view', 'id' => $model->id));
             }
         }
     }
     $this->render('create', array('model' => $model));
 }