Commit df216920 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Bug: drag and drop failed due to fillStoreForm requests {{form:S}} which was...

Bug: drag and drop failed due to fillStoreForm requests {{form:S}} which was not necessary for drag and drop.
parent 748ddac6
Pipeline #940 passed with stage
in 1 minute and 42 seconds
......@@ -2559,7 +2559,6 @@ abstract class AbstractBuildForm {
$dataDndApi .= '&' . FE_ORDER_INTERVAL . '=' . $orderInterval;
$dataDndApi .= '&' . FE_ORDER_COLUMN . '=' . $orderColumn;
$dataDndApi .= '&' . FE_DND_TABLE . '=' . $dndTable;
$dataDndApi .= '&form=' . $formName;
$dndAttributes = Support::doAttribute('class', 'qfq-dnd-sort');
$dndAttributes .= $this->evaluate->parse( "{{ '$dataDndApi' AS _data-dnd-api }}").' ';
......
......@@ -69,14 +69,16 @@ class FillStoreForm {
$this->feSpecNative = $this->loadFormElementsBasedOnSIP();
$form = $this->store->getVar(SIP_FORM, STORE_SIP, SANITIZE_ALLOW_ALNUMX);
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP, SANITIZE_ALLOW_DIGIT);
$tableFromFormSql = "SELECT tableName, primaryKey FROM Form WHERE name=?";
$form = $this->dbArray[$this->dbIndexQfq]->sql($tableFromFormSql,ROW_EXPECT_1, [$form]);
if (empty($form[F_PRIMARY_KEY])) {
$form[F_PRIMARY_KEY] = F_PRIMARY_KEY_DEFAULT;
}
$this->store->fillStoreWithRecord($form[F_TABLE_NAME], $recordId, $this->dbArray[$this->dbIndexData], $form[F_PRIMARY_KEY]);
if (!empty($form)) {
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP, SANITIZE_ALLOW_DIGIT);
$tableFromFormSql = "SELECT tableName, primaryKey FROM Form WHERE name=?";
$form = $this->dbArray[$this->dbIndexQfq]->sql($tableFromFormSql, ROW_EXPECT_1, [$form]);
if (empty($form[F_PRIMARY_KEY])) {
$form[F_PRIMARY_KEY] = F_PRIMARY_KEY_DEFAULT;
}
$this->store->fillStoreWithRecord($form[F_TABLE_NAME], $recordId, $this->dbArray[$this->dbIndexData], $form[F_PRIMARY_KEY]);
}
$this->evaluate = new Evaluate($this->store, $this->dbArray[$this->dbIndexData]);
}
......@@ -282,7 +284,7 @@ class FillStoreForm {
}
// Check only if there is something.
if ($val !== '' && $formMode!=FORM_UPDATE) {
if ($val !== '' && $formMode != FORM_UPDATE) {
$val = Sanitize::sanitize($val, $formElement[FE_CHECK_TYPE], $formElement[FE_CHECK_PATTERN],
$formElement[FE_DECIMAL_FORMAT], SANITIZE_EXCEPTION);
if ($formElement[FE_ENCODE] === FE_ENCODE_SPECIALCHAR) {
......
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