diff --git a/doc/CODING.md b/doc/CODING.md index abed0946acd5bf11a6f07d01d91e202f3246347a..d69530ab9d1339703ce97946594e02bb26c062b5 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 0c1db3313c5dadda63c913688724d9449c13c53b..5937922fd64f73bf7a492368a021d33e9d9aea10 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 538a3a87acec5121cda25bef343108d56c8fe50c..45ed7ca027a51b3fe0569cf5659cdbb6817426d0 100644 --- a/doc/PROTOCOL.md +++ b/doc/PROTOCOL.md @@ -23,7 +23,7 @@ JSON Response from the server containing at least: "message": "<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 `"<message>"` to the user. On `"success"`, the Client may display `"<message>"` to the user. diff --git a/extension/qfq/qfq/QuickFormQuery.php b/extension/qfq/qfq/QuickFormQuery.php index a4e4388e41f9502de04810876cfef3544a7d7fcd..6be7d15a97c76f0d84f549d64a8113d8b9fb774a 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); @@ -978,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, '');