public function actionProfileEdit($id)
 {
     $model = new ProfileForm();
     $model->loadModel($id);
     if ($model->load(Yii::$app->request->post())) {
         if ($model->save()) {
             Yii::$app->session->setFlash('success', 'Успешно сохранено!');
             return Yii::$app->getResponse()->redirect(Url::to(['site/profile-view', 'id' => $model['id']]));
         } else {
             Yii::$app->session->setFlash('warning', 'Упс, что-то пошло не так. Проверте введенные данные, вдруг в них закралась ошибка!');
         }
     }
     $specitems = Profile::getSpecsAllWithChoice($model->edu_base);
     return $this->render('profileEdit', ['model' => $model, 'specitems' => $specitems]);
 }
 /**
  * Spec items.
  *
  * @return mixed
  * @throws BadRequestHttpException
  */
 public function actionSpecItems($base = null)
 {
     $specitems = Profile::getSpecsAllWithChoice($base);
     return $this->renderAjax('_specitems', ['specitems' => $specitems]);
 }