Skip to content

Commit

Permalink
#4860 Remove Form/UI support
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Dec 9, 2024
1 parent dda355d commit 8e4b0fc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 157 deletions.
28 changes: 0 additions & 28 deletions api/v1/submissions/PKPSubmissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
use PKP\components\forms\publication\PKPMetadataForm;
use PKP\components\forms\publication\PKPPublicationIdentifiersForm;
use PKP\components\forms\publication\PKPPublicationLicenseForm;
use PKP\components\forms\publication\PublicationVersionStageForm;
use PKP\components\forms\publication\TitleAbstractForm;
use PKP\components\forms\submission\ChangeSubmissionLanguageMetadataForm;
use PKP\context\Context;
Expand Down Expand Up @@ -2079,33 +2078,6 @@ protected function getChangeLanguageMetadata(Request $illuminateRequest): JsonRe
return response()->json($this->getLocalizedForm($changeSubmissionLanguageMetadataForm, $submissionLocale, $locales), Response::HTTP_OK);
}

/**
* Get ChangeSubmissionLanguageMetadata Form component
*/
protected function getJAVStageMetadata(Request $illuminateRequest): JsonResponse
{
$request = $this->getRequest();
$data = $this->getSubmissionAndPublicationData($illuminateRequest);

$context = $data['context']; /** @var Context $context*/
$submission = $data['submission']; /** @var Submission $submission */
$publication = $data['publication']; /** @var Publication $publication*/

$locales = $this->getPublicationFormLocales($context, $submission);

$changeVersionStageApiUrl = $request->getDispatcher()->url(
$request,
Application::ROUTE_API,
$context->getData('urlPath'),
"submissions/{$submission->getId()}/publications/{$publication->getId()}/changeJavStageAndNumbering"
);

$changePublicationVersionStageForm = new PublicationVersionStageForm($changeVersionStageApiUrl, $submission, $publication, $context);
$submissionLocale = $submission->getData('locale');

return response()->json($this->getLocalizedForm($changePublicationVersionStageForm, $submissionLocale, $locales), Response::HTTP_OK);
}

/**
* Utility method used to get the metadata locale information for a submission publications and context
*/
Expand Down
124 changes: 0 additions & 124 deletions classes/components/forms/publication/PublicationVersionStageForm.php

This file was deleted.

5 changes: 0 additions & 5 deletions pages/workflow/PKPWorkflowHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace PKP\pages\workflow;

use PKP\components\forms\publication\PublicationVersionStageForm;
use APP\components\forms\publication\PublishForm;
use APP\core\Application;
use APP\core\PageRouter;
Expand Down Expand Up @@ -304,9 +303,6 @@ public function index($args, $request)
$changeSubmissionLanguageApiUrl = $request->getDispatcher()->url($request, Application::ROUTE_API, $submissionContext->getData('urlPath'), "submissions/{$submission->getId()}/publications/{$latestPublication->getId()}/changeLocale");
$changeSubmissionLanguageMetadataForm = new ChangeSubmissionLanguageMetadataForm($changeSubmissionLanguageApiUrl, $submission, $latestPublication, $submissionContext);

$changePublicationVersionStageApiUrl = $request->getDispatcher()->url($request, Application::ROUTE_API, $submissionContext->getData('urlPath'), "submissions/{$submission->getId()}/publications/{$latestPublication->getId()}/changeLocale");
$changePublicationVersionStageForm = new PublicationVersionStageForm($changePublicationVersionStageApiUrl, $submission, $latestPublication, $submissionContext);

$templateMgr->setConstants([
'STATUS_QUEUED' => PKPSubmission::STATUS_QUEUED,
'STATUS_PUBLISHED' => PKPSubmission::STATUS_PUBLISHED,
Expand All @@ -317,7 +313,6 @@ public function index($args, $request)
'FORM_PUBLICATION_LICENSE' => $publicationLicenseForm::FORM_PUBLICATION_LICENSE,
'FORM_PUBLISH' => PublishForm::FORM_PUBLISH,
'FORM_TITLE_ABSTRACT' => $titleAbstractForm::FORM_TITLE_ABSTRACT,
'FORM_PUBLICATION_VERSION_STAGE' => $changePublicationVersionStageForm::FORM_PUBLICATION_VERSION_STAGE,
]);
$templateMgr->registerClass($publicationLicenseForm::class, $publicationLicenseForm::class); // FORM_PUBLICATION_LICENSE
$templateMgr->registerClass(PublishForm::class, PublishForm::class); // FORM_PUBLISH;
Expand Down

0 comments on commit 8e4b0fc

Please sign in to comment.