From 6f5aae71a9cd1400ba322521bc01ad633ab8837f Mon Sep 17 00:00:00 2001 From: elvill Date: Mon, 5 Feb 2018 17:41:27 +0100 Subject: [PATCH 1/3] Bug #3192 - Fill STORE_RECORD before loading table title --- extension/qfq/qfq/QuickFormQuery.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extension/qfq/qfq/QuickFormQuery.php b/extension/qfq/qfq/QuickFormQuery.php index a4e4388e..5e46a70d 100644 --- a/extension/qfq/qfq/QuickFormQuery.php +++ b/extension/qfq/qfq/QuickFormQuery.php @@ -652,6 +652,10 @@ class QuickFormQuery { unset($form[FE_FILL_STORE_VAR]); } + // this is needed for filling templateGroup records with their default values + // and for evaluating variables in the Form title + $this->fillStoreWithRecord($form[F_TABLE_NAME], $recordId, STORE_RECORD); + $formSpec = $this->eval->parseArray($form); // Setting defaults later is too late. @@ -678,9 +682,6 @@ class QuickFormQuery { // Set F_FINAL_DELETE_FORM $formSpec[F_FINAL_DELETE_FORM] = ($formSpec[F_EXTRA_DELETE_FORM] != '') ? $formSpec[F_EXTRA_DELETE_FORM] : $formSpec[F_NAME]; - // this is needed for filling templateGroup records with their default values - $this->fillStoreWithRecord($formSpec[F_TABLE_NAME], $recordId, STORE_RECORD); - // Fire FE_FILL_STORE_VAR after the primary form record has been loaded if (!empty($fillStoreVar)) { $rows = $this->eval->parse($fillStoreVar); -- GitLab From 8149b20277fb35114017e58ba610d849a2459889 Mon Sep 17 00:00:00 2001 From: elvill Date: Mon, 5 Feb 2018 17:57:00 +0100 Subject: [PATCH 2/3] Fix small typos in coding docs --- doc/CODING.md | 6 +++--- doc/HTML.md | 2 +- doc/PROTOCOL.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/CODING.md b/doc/CODING.md index abed0946..d69530ab 100644 --- a/doc/CODING.md +++ b/doc/CODING.md @@ -216,7 +216,7 @@ Formelement type: DATE / DATETIME / TIME * regexp might be user defined. If given, do not use system regexp! * No min/max check. * Server: - * check with system wirde regexp + * check with system wide regexp * regexp might be user defined. If given, do not use system regexp! * Do min/max check. @@ -250,8 +250,8 @@ Debug / Log $this->store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM) === 'yes' -Errormessages & Eceptions -========================= +Errormessages & Exceptions +========================== * Exception types: * Code diff --git a/doc/HTML.md b/doc/HTML.md index 0c1db331..5937922f 100644 --- a/doc/HTML.md +++ b/doc/HTML.md @@ -4,7 +4,7 @@ This document explains the HTML markup used by QFQ. ## Hooks -Hooks are used on by the Client to gather information required for +Hooks are used on the Client to gather information required for asynchronous requests and to add predefined event handlers to HTML Elements. diff --git a/doc/PROTOCOL.md b/doc/PROTOCOL.md index 538a3a87..45ed7ca0 100644 --- a/doc/PROTOCOL.md +++ b/doc/PROTOCOL.md @@ -23,7 +23,7 @@ JSON Response from the server containing at least: "message": "" } -`status` indicates whether or not the request has been fullfiled by +`status` indicates whether or not the request has been fulfilled by the server (`"success"`) or encountered an error (`"error"`). On `"error"` the Client must display `""` to the user. On `"success"`, the Client may display `""` to the user. -- GitLab From cb9672086f80e45f1cdae49fe51a2247aedf07fb Mon Sep 17 00:00:00 2001 From: elvill Date: Tue, 6 Feb 2018 10:15:38 +0100 Subject: [PATCH 3/3] #Bug 3192 - Form Title mit Record-Variabeln (final commit:reformat) --- extension/qfq/qfq/QuickFormQuery.php | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/qfq/qfq/QuickFormQuery.php b/extension/qfq/qfq/QuickFormQuery.php index 5e46a70d..6be7d15a 100644 --- a/extension/qfq/qfq/QuickFormQuery.php +++ b/extension/qfq/qfq/QuickFormQuery.php @@ -979,6 +979,7 @@ class QuickFormQuery { * @return array */ private function initForm(array $formSpec) { + Support::setIfNotSet($formSpec, F_EXTRA_DELETE_FORM, ''); Support::setIfNotSet($formSpec, F_SUBMIT_BUTTON_TEXT, ''); Support::setIfNotSet($formSpec, F_BUTTON_ON_CHANGE_CLASS, ''); -- GitLab