Commit 5e9ac967 authored by Carsten  Rose's avatar Carsten Rose

Fixes #7705. Implement dirty workaround to skip sending of 'not exploded' TG FE's auf save.

parent 97be03dc
Pipeline #3123 passed with stages
in 2 minutes and 1 second
......@@ -9,6 +9,7 @@
namespace IMATHUZH\Qfq\Core;
use IMATHUZH\Qfq\Core\Database\Database;
use IMATHUZH\Qfq\Core\Form\Checkbox;
use IMATHUZH\Qfq\Core\Helper\HelperFile;
use IMATHUZH\Qfq\Core\Helper\HelperFormElement;
use IMATHUZH\Qfq\Core\Helper\KeyValueStringParser;
......@@ -21,7 +22,6 @@ use IMATHUZH\Qfq\Core\Report\Link;
use IMATHUZH\Qfq\Core\Report\Report;
use IMATHUZH\Qfq\Core\Store\Sip;
use IMATHUZH\Qfq\Core\Store\Store;
use IMATHUZH\Qfq\Core\Form\Checkbox;
/**
* Class AbstractBuildForm
......@@ -763,6 +763,10 @@ abstract class AbstractBuildForm {
continue; // skip this FE
}
// #7705. Dirty fix: 'form_save and fresh created tg element can't be updated, cause the HTML id is unknown: skip those.
if ($mode == FORM_SAVE && false != stripos($fe[FE_NAME], '%d')) {
continue; // skip this FE
}
$flagOutput = ($fe[FE_TYPE] !== FE_TYPE_EXTRA); // type='extra' will not displayed and not transmitted to the form.
$debugStack = array();
......@@ -3667,9 +3671,7 @@ EOT;
* '{{!SELECT ...' statement, that one will be fired. In case of an non-primary FE, the result array are the
* values for the copies of the specific FE.
*
* Additional the maximum count of all select rows will be determined and returned.
*
* @return int max number of records in FormElement[FE_VALUE] over all FormElements.
* @return int Count of records in FormElement[FE_VALUE] over all FormElements.
* @throws \CodeException
* @throws \DbException
* @throws \UserFormException
......
......@@ -171,7 +171,9 @@ class Save {
break;
}
$feName = $formElement[FE_NAME];
if (!isset($formValues[$feName]) && $this->isMemberOfTemplateGroup($formElement)) {
// #7705. Skip FE, which are not already expanded. Detect them by '%' (== '%d')
if (!isset($formValues[$feName]) && false === stripos($feName, '%d') && $this->isMemberOfTemplateGroup($formElement)) {
$formValues[$feName] = $formElement[FE_VALUE];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment