Skip to content
Snippets Groups Projects
Commit 42ee2086 authored by enured's avatar enured
Browse files

B17519: Filepond downloadButton behaviour corrected if no parameter is given. refs #17519

parent 9c33550e
No related branches found
No related tags found
2 merge requests!691New version v24.3.0,!654B17519 filepond js error
Pipeline #11758 passed
......@@ -3126,7 +3126,10 @@ abstract class AbstractBuildForm {
// Check for upload type new or old and initialize json config for new upload type
$jsonConfig = array();
$preloadedFiles = '';
$formElement[FE_FILE_DOWNLOAD_BUTTON] = $formElement[FE_FILE_DOWNLOAD_BUTTON] ?? '';
$downloadButton = $formElement[FE_FILE_DOWNLOAD_BUTTON] ?? false;
if ($downloadButton) {
$downloadButton = substr($this->evaluate->parse($formElement[FE_FILE_DOWNLOAD_BUTTON]), 2);
}
$jsonConfig[UPLOAD_MIME_TYPE_ACCEPT] = $formElement[FE_FILE_MIME_TYPE_ACCEPT] ?? null;
$jsonConfig[UPLOAD_MAX_FILE_SIZE] = $arr[FE_FILE_MAX_FILE_SIZE] ?? null;
$jsonConfig[UPLOAD_MULTI_UPLOAD] = false;
......@@ -3141,7 +3144,7 @@ abstract class AbstractBuildForm {
$jsonConfig[UPLOAD_ID] = 1;
$jsonConfig[UPLOAD_GROUP_ID] = $groupId ?? 0;
$jsonConfig[UPLOAD_DROP_BACKGROUND] = 'white';
$jsonConfig[UPLOAD_DOWNLOAD_BUTTON] = substr($this->evaluate->parse($formElement[FE_FILE_DOWNLOAD_BUTTON]), 2);
$jsonConfig[UPLOAD_DOWNLOAD_BUTTON] = $downloadButton;
$jsonConfig[UPLOAD_TYPE_FORM] = true;
$jsonConfig[UPLOAD_FORM_ID] = $formElement[FE_HTML_ID];
$jsonConfig[UPLOAD_SIP_DOWNLOAD_KEY] = $sipDownloadKey;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment