Merge pull request #6150 from open-sausages/pulls/4.0/fix-form-validation-persistence

BUG prevent form data / validation persisting in state when using form schema
This commit is contained in:
Daniel Hensby 2016-10-11 15:43:59 +01:00 committed by GitHub
commit 369fde2a5b

View File

@ -341,6 +341,10 @@ class LeftAndMain extends Controller implements PermissionProvider {
$data = $this->getSchemaForForm($form); $data = $this->getSchemaForForm($form);
$response = new HTTPResponse(Convert::raw2json($data)); $response = new HTTPResponse(Convert::raw2json($data));
$response->addHeader('Content-Type', 'application/json'); $response->addHeader('Content-Type', 'application/json');
// Clear non-schema form validation / data / message
// since it does not need to be redirected
$form->clearMessage();
return $response; return $response;
} }
return null; return null;