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

Database.php: fixed typo

parent 41a2bb3a
......@@ -51,7 +51,7 @@ const SQL_FORM_ELEMENT_CONTAINER_TEMPLATE_GROUP = "SELECT fe.id, fe.name, fe.lab
const SQL_FORM_ELEMENT_TEMPLATE_GROUP_FE_ID = "SELECT * FROM FormElement AS fe WHERE fe.id = ? AND fe.deleted = 'no' AND fe.class = 'container' AND fe.type='templateGroup' AND fe.enabled='yes' ";
const SQL_FORM_ELEMENT_NATIVE_TG_COUNT = "SELECT fe.*, IFNULL(feTg.maxLength,0) AS _tgCopies FROM FormElement AS fe LEFT JOIN FormElement AS feTg ON fe.feIdContainer=feTg.id AND feTg.deleted = 'no' AND feTg.class = 'container' AND feTg.type='templateGroup' AND feTg.enabled='yes' WHERE fe.formId = ? AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes'";
const NAME_TG_COPIES = '_tgCopies'; // Number of templatesGroup copies to create on the fly.
const NAME_TG_COPIES = '_tgCopies'; // Number of templatesGroup copies to create on the fly. Also used in SQL_FORM_ELEMENT_NATIVE_TG_COUNT.
const FE_TG_INDEX = '_tgIndex'; // Index of the current copy of a templateGroup FE.
// SANITIZE Classifier
......
......@@ -430,8 +430,7 @@ class QuickFormQuery {
case FORM_SAVE:
case FORM_UPDATE:
// $this->feSpecNative = $this->db->getNativeFormElements(SQL_FORM_ELEMENT_ALL_CONTAINER, ['no', $this->formSpec["id"], 'native'], $this->formSpec);
// $this->feSpecNative = $this->db->getNativeFormElements(SQL_FORM_ELEMENT_ALL_CONTAINER, ['no', $this->formSpec["id"], 'native'], $this->formSpec);
$this->feSpecNative = $this->getNativeFormElements(SQL_FORM_ELEMENT_NATIVE_TG_COUNT, [$this->formSpec["id"]], $this->formSpec);
break;
......
......@@ -668,7 +668,7 @@ class Database {
* @param array $formSpec Main FormSpec to copy generic parameter to FormElements
* @return array|int
* @throws \qfq\CodeException
* @throws \qfq\DbException$this->feSpecNative
* @throws \qfq\DbException
*/
public function getNativeFormElements($sql, array $param, $formSpec) {
......
......@@ -223,7 +223,8 @@ VALUES
'', '', 'specialchar'),
(2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, 0, 0, '', '', '',
'{{!SELECT fe.id, CONCAT(fe.type, " / ", fe.name) FROM FormElement As fe WHERE fe.formId={{formId:S0}} AND fe.class="container" ORDER BY fe.type, fe.name }}',
'emptyItemAtStart', 100, '', 'no', '', '', '', '', '', 'specialchar'),
'emptyItemAtStart', 100, '', 'no', '', '', '', '{{SELECT IF(COUNT(fe.id)>0, "show", "hidden") FROM Form AS f LEFT JOIN FormElement AS fe ON f.id=fe.formId AND fe.class="container" WHERE f.id=70 GROUP BY f.id}}',
'', 'specialchar'),
(2, 'enabled', 'Enabled', 'show', 'checkbox', 'all', 'native', 130, 0, 0, '', '', '', '', '', 100, '', 'no', '', '', '', '', '', 'specialchar'),
(2, 'dynamicUpdate', 'Dynamic Update', 'show', 'checkbox', 'all', 'native', 135, 0, 0, 'On change, this element will be updated and trigger other.',
'', '', '', '', 100, '', 'no', '3', '2', '7', '', '', '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