From 9b4cfd21aa2f3c802b0652a559ed2ac8fa9d360d Mon Sep 17 00:00:00 2001 From: Alec Smecher Date: Fri, 28 Aug 2020 13:32:33 -0700 Subject: [PATCH] pkp/pkp-lib#4668 Fix server bounce of tag-it fields --- QuickSubmitForm.inc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/QuickSubmitForm.inc.php b/QuickSubmitForm.inc.php index 660a3dc..b5bebee 100644 --- a/QuickSubmitForm.inc.php +++ b/QuickSubmitForm.inc.php @@ -265,6 +265,21 @@ function readInputData() { 'locale' ) ); + + // Process entered tagit fields values + // @see PKPSubmissionHandler::saveStep + $tagitKeywords = $this->getData('keywords'); + if (is_array($tagitKeywords)) { + $tagitFieldNames = $this->_metadataFormImplem->getTagitFieldNames(); + $locales = array_keys($this->supportedLocales); + $formTagitData = array(); + foreach ($tagitFieldNames as $tagitFieldName) { + foreach ($locales as $locale) { + $formTagitData[$locale] = array_key_exists($locale . "-$tagitFieldName", $tagitKeywords) ? $tagitKeywords[$locale . "-$tagitFieldName"] : array(); + } + $this->setData($tagitFieldName, $formTagitData); + } + } } /**