public function actionSave()
    {
        $post = Yii::$app->request->post();
        $id = $post['Note']['id'];
        if($id) {
            $model = Note::findOne($id);
        } else {
            $model = new Note;
        }
        Yii::$app->response->format = 'json';
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return ['success' => true];
        } else {
            return ['success' => false, 'errors' => $model->getErrors()];
        }
    }