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

Merge branch '3192-variables-in-form-title' into 'master'

3192 variables in form title

See merge request !32
parents b3fe0ab8 b5c30097
......@@ -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
......
......@@ -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.
......
......@@ -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.
......
......@@ -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, '');
......
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