From b065e8c6745c123e32b38cda163011a81015ce0a Mon Sep 17 00:00:00 2001 From: Taslan Graham Date: Mon, 7 Oct 2024 10:21:11 -0500 Subject: [PATCH] pkp/pkp-lib#10508 Apply getLocalizedForm method to TitleAbstractForm form --- api/v1/submissions/PKPSubmissionController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/v1/submissions/PKPSubmissionController.php b/api/v1/submissions/PKPSubmissionController.php index 706a520759c..dffbc1bda5f 100644 --- a/api/v1/submissions/PKPSubmissionController.php +++ b/api/v1/submissions/PKPSubmissionController.php @@ -1965,10 +1965,12 @@ protected function getPublicationTitleAbstractForm(Request $illuminateRequest): return response()->json([ 'error' => $data['error'],], $data['status']); } - $locales = $this->getPublicationFormLocales($data['context'], $data['submission']); + $submission = $data['submission']; /** @var Submission $submission */ + $locales = $this->getPublicationFormLocales($data['context'], $submission); + $submissionLocale = $submission->getData('locale'); $titleAbstract = new TitleAbstractForm($data['publicationApiUrl'], $locales, $data['publication']); - return response()->json($titleAbstract->getConfig(), Response::HTTP_OK); + return response()->json($this->getLocalizedForm($titleAbstract, $submissionLocale, $locales), Response::HTTP_OK); } /**