public function actionUpdate($new = false) { $this->topButtons = false; if ($new === true) { $model = new Delivery(); $model->unsetAttributes(); $this->pageName = $model->t('PAGE_NAME', 0); } else { $model = $this->loadModel($_GET['id']); $this->pageName = $model->t('PAGE_NAME', 1); } $this->breadcrumbs = array(Yii::t('DeliveryModule.default', 'MODULE_NAME') => array('index'), $this->pageName); if (isset($_POST['Delivery'])) { $model->attributes = $_POST['Delivery']; //$this->performAjaxValidation($model); if ($model->validate()) { $model->save(); $this->redirect(array('index')); } } $this->render('update', array('model' => $model)); }