Skip to content

Commit

Permalink
pkp#10508 Apply getLocalizedForm method to TitleAbstractForm form
Browse files Browse the repository at this point in the history
  • Loading branch information
taslangraham committed Oct 7, 2024
1 parent 78592d2 commit b065e8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/v1/submissions/PKPSubmissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit b065e8c

Please sign in to comment.