Skip to content

Commit 8928748

Browse files
committed
Merge branch 'rollbackRelease' into 'main'
Rollback release See merge request softwares-pkp/plugins_ojs/doiscielo!28
2 parents 81171aa + d204294 commit 8928748

5 files changed

Lines changed: 2 additions & 87 deletions

File tree

ScieloScreeningPlugin.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ public function register($category, $path, $mainContextId = null)
4141

4242
if ($success && $this->getEnabled($mainContextId)) {
4343
Hook::add('Form::config::after', [$this, 'editFormComponents']);
44-
Hook::add('preprintgalleyform::display', [$this, 'modifyGalleyForm']);
45-
Hook::add('preprintgalleyform::validate', [$this, 'modifyGalleyFormValidation']);
4644
Hook::add('TemplateManager::display', [$this, 'modifySubmissionSteps']);
4745
Hook::add('Submission::validateSubmit', [$this, 'validateSubmissionFields']);
4846
Hook::add('Template::SubmissionWizard::Section::Review', [$this, 'modifyReviewSections']);
@@ -166,52 +164,6 @@ private function removePrefixAndSubtitleFields($formConfig)
166164
return $formConfig;
167165
}
168166

169-
public function modifyGalleyForm($hookName, $params)
170-
{
171-
$request = Application::get()->getRequest();
172-
$templateMgr = TemplateManager::getManager($request);
173-
174-
$templateMgr->registerFilter("output", [$this, 'removeFieldsFromGalleyFormFilter']);
175-
}
176-
177-
public function removeFieldsFromGalleyFormFilter($output, $templateMgr)
178-
{
179-
if (preg_match('/id="preprintGalleyForm"/', $output)) {
180-
preg_match('/<\/form>/', $output, $matches, PREG_OFFSET_CAPTURE);
181-
182-
$posMatch = $matches[0][1];
183-
$removeGalleyFields = $templateMgr->fetch($this->getTemplateResource('removeGalleyFields.tpl'));
184-
$output = substr_replace($output, $removeGalleyFields, $posMatch, 0);
185-
186-
$templateMgr->unregisterFilter('output', array($this, 'removeFieldsFromGalleyFormFilter'));
187-
}
188-
189-
return $output;
190-
}
191-
192-
public function modifyGalleyFormValidation($hookName, $params)
193-
{
194-
$form = &$params[0];
195-
$submission = $form->_submission;
196-
197-
if (!empty($submission->getData('submissionProgress'))) {
198-
return Hook::CONTINUE;
199-
}
200-
201-
$checker = new ScreeningChecker();
202-
$galleys = $submission->getGalleys();
203-
$galleysFiletypes = array_map(function ($galley) {
204-
return ($galley->getFileType());
205-
}, $galleys);
206-
207-
if ($checker->checkNumberPdfs($galleysFiletypes)[0]) {
208-
$form->addErrorField('preprintGalleyFormNotification');
209-
$form->addError('preprintGalleyFormNotification', __("plugins.generic.scieloScreening.screeningRules.numPdfs"));
210-
}
211-
212-
return Hook::CONTINUE;
213-
}
214-
215167
public function modifySubmissionSteps($hookName, $params)
216168
{
217169
$request = Application::get()->getRequest();

cypress/tests/Test1_submissionWizard.cy.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,6 @@ describe('SciELO Screening Plugin - Submission wizard tests', function() {
194194
cy.contains('It was not possible to verify the scientific production of the ORCID records, since no PDF document was sent');
195195
cy.get('.pkpSteps__step button:contains("Upload Files")').click();
196196

197-
cy.get('a:contains("Add File")').click();
198-
cy.get('.pkp_modal_panel').within(() => {
199-
cy.contains('Add File');
200-
cy.get('label:contains("This galley will be available at a separate website")').should('not.exist');
201-
cy.get('input[name="remotelyHostedContent"]').should('not.exist');
202-
cy.get('input[name="urlPath"]').should('not.exist');
203-
cy.get('a.pkpModalCloseButton').click();
204-
});
205-
206197
cy.addSubmissionGalleys([files[0], files[0]]);
207198
cy.contains('button', 'Continue').click();
208199
cy.contains('button', 'Continue').click();

cypress/tests/Test2_workflowFeatures.cy.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,6 @@ describe('SciELO Screening Plugin - WorkFlow features tests', function() {
8686
cy.contains('.pkpFormFieldLabel', 'Prefix').should('not.exist');
8787
cy.contains('.pkpFormFieldLabel', 'Subtitle').should('not.exist');
8888
});
89-
it("Authors can not send multiple PDFs", function () {
90-
cy.login('dphillips', null, 'publicknowledge');
91-
cy.findSubmission('myQueue', screenedSubmissionTitle);
92-
93-
cy.contains('button', 'Preprint').click();
94-
cy.contains('button', 'Galleys').click();
95-
96-
cy.contains('a', 'Add File').click();
97-
cy.wait(200);
98-
cy.get('#preprintGalleyForm').within(() => {
99-
cy.get('input[name="label"]').type('PDF', {delay: 0});
100-
cy.contains('.submitFormButton', 'Save').click();
101-
});
102-
cy.reload();
103-
104-
cy.contains("Only one PDF document should be sent");
105-
});
10689
it("Disables plugin temporarily", function () {
10790
cy.login('dbarnes', null, 'publicknowledge');
10891
cy.contains('a', 'Website').click();

templates/removeGalleyFields.tpl

Lines changed: 0 additions & 11 deletions
This file was deleted.

version.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<version>
99
<application>scieloScreening</application>
1010
<type>plugins.generic</type>
11-
<release>2.1.4.0</release>
12-
<date>2025-10-19</date>
11+
<release>2.1.4.1</release>
12+
<date>2025-10-22</date>
1313
<lazy-load>1</lazy-load>
1414
<class>ScieloScreeningPlugin</class>
1515
</version>

0 commit comments

Comments
 (0)