public function postAction(Request $request)
    {
        //if (!$request->isXmlHttpRequest()) {
        //throw new \HttpRequestMethodException('Not isXmlHttpRequest');
        //}

        $request_params = $this->getJsonParams($request);

        $feedback = new Feedback();

        $feedbackManager = $this->get('compo_feedback.manager.feedback');
        $feedbackType = $feedbackManager->getType($request_params['data']['type']);

        $form = $this->createForm($feedbackType['form'], $feedback);

        $form->submit($request_params['data']);

        $csrf = $this->get('security.csrf.token_manager');

        if (!$form->isValid()) {
            $csrf->refreshToken('feedback_protection');

            return View::create(['success' => false, 'error' => 'form_not_valid'], 400);
        }

        try {
            $em = $this->getDoctrine()->getManager();

            $em->persist($feedback);
            $em->flush();

            $csrf->refreshToken('feedback_protection');

            $this->get('compo_notification.manager.notification')->send($feedback->getType(), ['feedback' => $feedback]);

            return View::create(['success' => true, 'message' => 'contacts_sent'], 200);
        } catch (\Exception $e) {
            return View::create(['success' => false, 'error' => $e->getMessage()], 400);
        }
    }