Commit 6f2007d2 authored by Elias Villiger's avatar Elias Villiger
Browse files

Merge with punktetool and fix (many) merge conflicts

parents 238988fc 0857d28a
......@@ -37,6 +37,45 @@ Bug Fixes
^^^^^^^^^
Version 0.25.10
---------------
Date: 26.01.2018
Notes
^^^^^
* PROTOCOL.md: update notes
* Form / Upload: new option 'downloadButton' - if given renders a download button instead of showing the pathFileName.
Features
^^^^^^^^
* #5023 / Fabric: Cut, rotate and enhance uploaded images. Update Manual.
* All FE 'typeahead' fields are set to 'autocomplete="off"'. Respect user setting for 'autocomplete' - if none given (mostly), set it for FE 'typeahead' to 'off'
* #5295: Upload: check if given QFQ 'maxFileSize' is higher than php.in post_max_size, upload_max_filesize
* FE.Subrecord: rearranged column order, start columns with uppercase letter.
* New CSS class 'qfq-full-width-left': especially for buttons to become full width.
* New CSS class 'qfq-table-100' - 100% width, with auto width per column. FE.subrecord changed to 'qfq-table-100'.
* #5302 / remove CSS class 'internal / external'
Bug Fixes
^^^^^^^^^
* #5189 / BCC SendMail Problem - fixed missing double ticks
* Manual.rst: Update documentation that the default escape type is 'm'. Remove subrecord/list (have been removed long
time ago). Fix enumeration problem FE.type=radio `classButton`. Add short note for typeahead.js. Remove never
implemented 'keySemdId...', 'ANREDE'. Fixed typo - replace '\' by '\\' on most places (not in code sections).
More generic SQL to extract filename from pathFileName. Fixed several phinx syntax errors. Add example for
'recent list'-records.
* Fixed problem with missing 'if note exits' in CREATE TABLE `Split`.
* #5030 / Manual.rst: Fixed example with XSS vulnerability.
* #5275 / typeahead.bundle.min.js missing in Manual.rst: fixed.
* FormEditor: 'typeahead' for column 'name' fixed. Attention: only succeed if DB_1_NAME is the final DB (mostly given).
* #5048 / Default value NULL in pathFileName breaks uploads.
* #5028 / Links im FormularEditor zeigen ins Leere (Fehlende Ziel-Anker) - fixed.
* Make readonly BS radio buttons non-selectable
Version 0.25.9
--------------
......
......@@ -47,8 +47,8 @@ Neue Versionsnummer
6) **New Tag**:
git tag v0.25.9
git push -u origin v0.25.9
git tag v0.25.10
git push -u origin v0.25.10
7) PhpStorm: **Sync** all files to VM qfq.
......
......@@ -227,7 +227,7 @@ Setup a *report* to manage all *forms*:
10 {
# List of Forms: Do not show this list of forms if there is a form given by SIP.
# Table header.
sql = SELECT CONCAT('{{pageId:T}}&form=form&') as _Pagen, '#', 'Name', 'Title', 'Table', '' FROM (SELECT 1) AS fake WHERE '{{form:SE}}'=''
sql = SELECT CONCAT('p:{{pageId:T}}&form=form') as _pagen, '#', 'Name', 'Title', 'Table', '' FROM (SELECT 1) AS fake WHERE '{{form:SE}}'=''
head = <table class="table table-hover qfq-table-50">
tail = </table>
rbeg = <thead><tr>
......@@ -237,7 +237,7 @@ Setup a *report* to manage all *forms*:
10 {
# All forms
sql = SELECT CONCAT('{{pageId:T}}&form=form&r=', f.id) as _Pagee, f.id, f.name, f.title, f.tableName, CONCAT('form=form&r=', f.id) as _Paged FROM Form AS f ORDER BY f.name
sql = SELECT CONCAT('p:{{pageId:T}}&form=form&r=', f.id) as _pagee, f.id, f.name, f.title, f.tableName, CONCAT('form=form&r=', f.id) as _Paged FROM Form AS f ORDER BY f.name
rbeg = <tr>
rend = </tr>
fbeg = <td>
......@@ -951,17 +951,15 @@ specific locations in the text will be (automatically by QFQ) replaced by values
Sanitize class
--------------
* If a value violates a parameter sanitize class, the value becomes an empty string.
* Per store there is a default if sanitizing applies and if yes, which class.
* Store *C* (Client=Browser) and store *F* (Form) will be sanitized with 'digit'.
Values in STORE_CLIENT *C* (Client=Browser) and STORE_FORM *F* (Form, HTTP 'post') will be checked against a sanitize class.
Values from other stores are not checked against any sanitize class.
* If a value violates the specific sanitize class, the value becomes `!!<name of sanitize class>!!`. E.g. `!!gigit!!`.
* All `predefined-variable-names`_ have a specific default sanitize class. For these variables, it's not necessary
to specify a sanitize class.
* All other variables (Store: C, F) get by default the sanitize class defined in the corresponding form. If not defined,
to specify an individual sanitize class.
* All other variables get by default the sanitize class defined in the corresponding `FormElement`. If not defined,
the default class is 'digit'.
* A default sanitize class can be overwritten by individual definition: *{{a:C:all}}*
* If there is a sanitized class specified, it applies to all given stores.
For QFQ variables and FormElements:
......@@ -1039,8 +1037,8 @@ defining the `escape` modifier `m`.
**QFQ notice**:
* Variables passed by the client (=Browser) are untrusted and use the default sanitize class 'digit' (if nothing else is
specified). If alpha characters are submitted, the content violates `digit` and becomes therefore empty - there is no
error message. Best is to always use SIP or digits.
specified). If alpha characters are submitted, the content violates `digit` and becomes therefore
`!!<name of sanitize class>!!` - there is no error message. Best is to always use SIP or digits.
Get Parameter
-------------
......@@ -2323,10 +2321,11 @@ Fields:
+---------------------+-----------------------------+-----------------------------------------------------------------------------------------------------+
|Encode | 'none', 'specialchar' | With 'specialchar' (default) the chars <>"'& will be encoded to their htmlentity. _`field-encode` |
+---------------------+-----------------------------+-----------------------------------------------------------------------------------------------------+
|Check Type | enum('number', 'pattern', | _`field-checkType` |
| | 'email') | |
|Check Type | enum('alnumx','digit', | _`field-checktype` |
| | 'numerical','email', | |
| | 'pattern','allbut','all') | |
+---------------------+-----------------------------+-----------------------------------------------------------------------------------------------------+
|Check Pattern | 'regexp' |If $checkType=='pattern': pattern to match |
|Check Pattern | 'regexp' |_`field-checkpattern`: If $checkType=='pattern': pattern to match |
+---------------------+-----------------------------+-----------------------------------------------------------------------------------------------------+
|Order | string | Display order of *FormElements* ('order' is a reserved keyword) _`field-ord` |
+---------------------+-----------------------------+-----------------------------------------------------------------------------------------------------+
......@@ -2407,13 +2406,13 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| Name | Type | Note |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| data-pattern-error | string | Pattern violation: Text for error message used for all FormElements of current form |
| data-pattern-error | string | Pattern violation: Text for error message |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| data-required-error | string | Required violation: Text for error message used for all FormElements of current form |
| data-required-error | string | Required violation: Text for error message |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| data-match-error | string | Match violation: Text for error message used for all FormElements of current form |
| data-match-error | string | Match violation: Text for error message |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| data-error | string | If none specific is defined: Text for error message used for all FormElements of current form |
| data-error | string | Violation of 'check-type': Text for error message |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| htmlBefore | string | HTML Code wrapped before the complete *FormElement* |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
......@@ -3026,12 +3025,12 @@ will be rendered inside the form as a HTML table.
* *sql1*: SQL query to select records. E.g.::
{{!SELECT a.id AS id, CONCAT(a.street, a.streetnumber) AS a, a.city AS b, a.zip AS c FROM Address AS a}}
{{!SELECT addr.id AS id, CONCAT(addr.street, addr.streetnumber) AS a, addr.city AS b, addr.zip AS c FROM Address AS addr}}
* Notice the **exclamation mark** after '{{' - this is necessary to return an array of elements, instead of a single string.
* Exactly one column **'id'** has to exist; it specifies the primary record for the target form.
In case the id should not be visible to the user, it has to be named **'_id'**.
* Columnname: *[title=]<title>[|[maxLength=]<number>][|width=<number>][|nostrip][|icon][|link][|url][|mailto][|_rowClass][|_rowTooltip]*
* Columnname: *[title=]<title>[|[maxLength=]<number>][|nostrip][|icon][|link][|url][|mailto][|_rowClass][|_rowTooltip]*
* If the keyword is used, all parameter are position independent.
* Parameter are separated by '|'.
......@@ -3062,6 +3061,7 @@ will be rendered inside the form as a HTML table.
{{!SELECT id, note1 AS 'Comment', note2 AS 'Comment|50' , note3 AS 'title=Comment|maxLength=100|nostrip', note4 AS '50|Comment',
'checked.png' AS 'Status|icon', email AS 'mailto', CONCAT(homepage, '|Homepage') AS 'url',
CONCAT('d|s|F:', pathFileName) AS 'Download|link',
ELT(status,'info','warning','danger') AS '_rowClass', help AS '_rowTooltip' ...}}
* *FormElement.parameter*
......@@ -3188,7 +3188,7 @@ See also `downloadButton`_ to offer a download of an uploaded file.
If `downloadButton` ist empty, just shows the regular download glyph.
Additional attributes might be given like `downloadButton='t:Download|o:check file`. Please check `download`_.
Additional attributes might be given like `downloadButton = t:Download|o:check file`. Please check `download`_.
* fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_
......@@ -3222,7 +3222,9 @@ Requires: *'upload'-FormElement.name = 'column name'* of an column in the primar
After moving the file to `fileDestination`, the current record/column will be updated to `fileDestination`.
The database definition of the named column has to be a string variant (varchar, text but not numeric or else).
On form load, the column value will be displayed as path/filename.
On form load, the column value will be displayed,
* as the whole value (pathFileName)
Deleting an uploaded file in the form (by clicking on the trash near beside) will delete
the file on the filesystem as well. The column will be updated to an empty string.
......@@ -3361,7 +3363,6 @@ Parameter: sqlValidate
* *messageFail* - Message to show. E.g.: *messageFail* = `There is already a person called {{firstname:F:all}} {{name:F:all}}`
.. _slave-id:
Parameter: slaveId
......@@ -5484,8 +5485,8 @@ Column: _sendmail
::
t:<TO:email[,email]>|F:<FROM:email>|s:<subject>|b:<body>
[|c:<CC:email[,email]]>[|B:<BCC:email[,email]]>[|F:<REPLY-TO:email>]
t:<TO:email[,email]>|f:<FROM:email>|s:<subject>|b:<body>
[|c:<CC:email[,email]]>[|B:<BCC:email[,email]]>[|r:<REPLY-TO:email>]
[|a:<flag autosubmit: on /off>][|g:<grid>][|x:<xId>][|y:<xId2>][|z:<xId3>]
[|C][d:<filename of the attachment>][|F:<file to attach>][|u:<url>][|p:<T3 uri>]
......@@ -5495,8 +5496,8 @@ Send text emails. Every mail will be logged in the table `mailLog`. Attachments
::
SELECT "t:john@doe.com|F:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow" AS _sendmail
SELECT "t:john@doe.com|F:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow|A:off|g:1|x:2|y:3|z:4" AS _sendmail
SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow" AS _sendmail
SELECT "t:john@doe.com|f:jane@doe.com|s:Reminder tomorrow|b:Please dont miss the meeting tomorrow|A:off|g:1|x:2|y:3|z:4" AS _sendmail
..
......@@ -5554,7 +5555,7 @@ Send text emails. Every mail will be logged in the table `mailLog`. Attachments
::
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available." AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available." AS _sendmail
..
......@@ -5564,8 +5565,8 @@ This will send an email with subject *Latest News* from company@example.com to j
::
10.sql = SELECT "t:customer1@example.com,Firstname Lastname <customer2@example.com>, Firstname Lastname <customer3@example.com>|
F:company@example.com|s:Latest News|b:The new version is now available.|r:sales@example.com|A:on|g:101|x:222|c:ceo@example.com|B:backup@example.com" AS _sendmail
10.sql = SELECT "t:customer1@example.com,Firstname Lastname <customer2@example.com>, Firstname Lastname <customer3@example.com>| \\
f:company@example.com|s:Latest News|b:The new version is now available.|r:sales@example.com|A:on|g:101|x:222|c:ceo@example.com|B:backup@example.com" AS _sendmail
..
......@@ -5606,22 +5607,22 @@ Optional any number of sources can be concatenated to a single PDF file: 'C|F:<f
Examples in Report::
# One file attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf" AS _sendmail
# Two files attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf|F:fileadmin/detail.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf|F:fileadmin/detail.pdf" AS _sendmail
# Two files and a webpage (converted to PDF) are attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf|F:fileadmin/detail.pdf|p:?id=export&r=123|d:person.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|F:fileadmin/summary.pdf|F:fileadmin/detail.pdf|p:?id=export&r=123|d:person.pdf" AS _sendmail
# Two webpages (converted to PDF) are attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|p:?id=export&r=123|d:person123.pdf|p:?id=export&r=234|d:person234.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|p:?id=export&r=123|d:person123.pdf|p:?id=export&r=234|d:person234.pdf" AS _sendmail
# One file and two webpages (converted to PDF) are *concatenated* to one PDF and attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|C|F:fileadmin/summary.pdf|p:?id=export&r=123|p:?id=export&r=234|d:complete.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|C|F:fileadmin/summary.pdf|p:?id=export&r=123|p:?id=export&r=234|d:complete.pdf" AS _sendmail
# One T3 webpage, protected by a SIP, are attached.
10.sql = SELECT "t:john.doe@example.com|F:company@example.com|s:Latest News|b:The new version is now available.|p:?id=export&r=123&_sip=1|d:person123.pdf" AS _sendmail
10.sql = SELECT "t:john.doe@example.com|f:company@example.com|s:Latest News|b:The new version is now available.|p:?id=export&r=123&_sip=1|d:person123.pdf" AS _sendmail
.. _column_img:
......@@ -6215,7 +6216,7 @@ A nice feature is to show a list with last changed records. The following will s
FormElement) forms: ::
10 {
sql = SELECT CONCAT('p:form&r=', f.id, '|t:', f.name,'|o:', GREATEST(MAX(fe.modified), f.modified)) AS _page
sql = SELECT CONCAT('p:{{pageAlias:T}}&form=form&r=', f.id, '|t:', f.name,'|o:', GREATEST(MAX(fe.modified), f.modified)) AS _page
FROM Form AS f
LEFT JOIN FormElement AS fe ON fe.formId = f.id
GROUP BY f.id
......@@ -6246,11 +6247,13 @@ QFQ specific
Variable empty: {{...}}
^^^^^^^^^^^^^^^^^^^^^^^
Specify the required sanitize class. Remember: for STORE_FORM and STORE_CLIENT the default is `digit`. This means if
Specify the required sanitize class. Remember: for STORE_FORM and STORE_CLIENT the default is sanatize class is `digit`. This means if
the variable content is a string, this violates the sanitize class and the replaced content will be an empty string!
Form: put the problematic variable or SQL statement in the 'title' or note 'field' of a `FormElement`. This should show
the content. For SQL statements insert a character before the SQL Keyword to avoid SQL triggering.
the content. For SQL statements, remove the outer token (e.g. only one curly brace) to avoid SQL triggering: ::
Person { SELECT ... WHERE id={{buggyVar:alnumx}} }
Error read file config.qfq.ini: syntax error on line xx
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......@@ -6263,10 +6266,10 @@ Logging
General webserver error log
^^^^^^^^^^^^^^^^^^^^^^^^^^^
For apache: /var/log/apache2/error_log
For apache: `/var/log/apache2/error_log`
Especially if you got a blank page (no rendering at all), this is typically an uncaught PHP error. Check the error message
and report the bug.
and report the bug (http://qfq.io > Contact).
Call to undefined function qfq\\mb_internal_encoding()
''''''''''''''''''''''''''''''''''''''''''''''''''''''
......
......@@ -38,21 +38,44 @@ Bug Fixes
Version 0.25.10
----------------
---------------
Date: <date>
Date: 26.01.2018
Notes
^^^^^
* PROTOCOL.md: update notes
* Form / Upload: new option 'downloadButton' - if given renders a download button instead of showing the pathFileName.
Features
^^^^^^^^
* #5023 / Fabric: Cut, rotate and enhance uploaded images. Update Manual.
* All FE 'typeahead' fields are set to 'autocomplete="off"'. Respect user setting for 'autocomplete' - if none given (mostly), set it for FE 'typeahead' to 'off'
* #5295: Upload: check if given QFQ 'maxFileSize' is higher than php.in post_max_size, upload_max_filesize
* FE.Subrecord: rearranged column order, start columns with uppercase letter.
* New CSS class 'qfq-full-width-left': especially for buttons to become full width.
* New CSS class 'qfq-table-100' - 100% width, with auto width per column. FE.subrecord changed to 'qfq-table-100'.
* #5302 / remove CSS class 'internal / external'
* #5309: checkTypes "min|max" and "min|max date" are now deprecated. Instead, use notation "min = " / "max = " in parameter field of FormElement. Usages of deprecated checktypes were automatically transferred to the new notation.
Bug Fixes
^^^^^^^^^
* #5189 / BCC SendMail Problem - fixed missing double ticks
* Manual.rst: Update documentation that the default escape type is 'm'. Remove subrecord/list (have been removed long
time ago). Fix enumeration problem FE.type=radio `classButton`. Add short note for typeahead.js. Remove never
implemented 'keySemdId...', 'ANREDE'. Fixed typo - replace '\' by '\\' on most places (not in code sections).
More generic SQL to extract filename from pathFileName. Fixed several phinx syntax errors. Add example for
'recent list'-records.
* Fixed problem with missing 'if note exits' in CREATE TABLE `Split`.
* #5030 / Manual.rst: Fixed example with XSS vulnerability.
* #5275 / typeahead.bundle.min.js missing in Manual.rst: fixed.
* FormEditor: 'typeahead' for column 'name' fixed. Attention: only succeed if DB_1_NAME is the final DB (mostly given).
* #5048 / Default value NULL in pathFileName breaks uploads.
* #5028 / Links im FormularEditor zeigen ins Leere (Fehlende Ziel-Anker) - fixed.
* Make readonly BS radio buttons non-selectable
Version 0.25.9
--------------
......
......@@ -3,7 +3,7 @@
project = QFQ - Quick Form Query
version = 0.25
release = 0.25.9
release = 0.25.10
t3author = Carsten Rose
copyright = since 2017 by the author
......
......@@ -59,7 +59,7 @@ copyright = u'2017, Carsten Rose'
# The short X.Y version.
version = '0.25'
# The full version, including alpha/beta/rc tags.
release = '0.25.9'
release = '0.25.10'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -37,6 +37,45 @@ Bug Fixes
^^^^^^^^^
Version 0.25.10
---------------
Date: 26.01.2018
Notes
^^^^^
* PROTOCOL.md: update notes
* Form / Upload: new option 'downloadButton' - if given renders a download button instead of showing the pathFileName.
Features
^^^^^^^^
* #5023 / Fabric: Cut, rotate and enhance uploaded images. Update Manual.
* All FE 'typeahead' fields are set to 'autocomplete="off"'. Respect user setting for 'autocomplete' - if none given (mostly), set it for FE 'typeahead' to 'off'
* #5295: Upload: check if given QFQ 'maxFileSize' is higher than php.in post_max_size, upload_max_filesize
* FE.Subrecord: rearranged column order, start columns with uppercase letter.
* New CSS class 'qfq-full-width-left': especially for buttons to become full width.
* New CSS class 'qfq-table-100' - 100% width, with auto width per column. FE.subrecord changed to 'qfq-table-100'.
* #5302 / remove CSS class 'internal / external'
Bug Fixes
^^^^^^^^^
* #5189 / BCC SendMail Problem - fixed missing double ticks
* Manual.rst: Update documentation that the default escape type is 'm'. Remove subrecord/list (have been removed long
time ago). Fix enumeration problem FE.type=radio `classButton`. Add short note for typeahead.js. Remove never
implemented 'keySemdId...', 'ANREDE'. Fixed typo - replace '\' by '\\' on most places (not in code sections).
More generic SQL to extract filename from pathFileName. Fixed several phinx syntax errors. Add example for
'recent list'-records.
* Fixed problem with missing 'if note exits' in CREATE TABLE `Split`.
* #5030 / Manual.rst: Fixed example with XSS vulnerability.
* #5275 / typeahead.bundle.min.js missing in Manual.rst: fixed.
* FormEditor: 'typeahead' for column 'name' fixed. Attention: only succeed if DB_1_NAME is the final DB (mostly given).
* #5048 / Default value NULL in pathFileName breaks uploads.
* #5028 / Links im FormularEditor zeigen ins Leere (Fehlende Ziel-Anker) - fixed.
* Make readonly BS radio buttons non-selectable
Version 0.25.9
--------------
......
......@@ -79,15 +79,15 @@
"icon": "glyphicon-search"
},
{
"name": "rotateRight",
"selector": "turn-right",
"name": "freeMouse",
"selector": "mouse-mode",
"requiresDrawing": false,
"requiresSelection": false,
"isToggle": false,
"toggle": "",
"requiresSelection": true,
"isToggle": true,
"toggle": "isMouseMode",
"hasToggleElement": false,
"toggleElement": "",
"icon": "glyphicon-repeat"
"icon": "glyphicon-hand-up"
}
],
"currentMode": "draw",
......
......@@ -10,6 +10,6 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase',
'clearcacheonload' => true,
'state' => 'alpha',
'version' => '0.25.9'
'version' => '0.25.10'
);
......@@ -180,7 +180,6 @@ abstract class AbstractBuildForm {
$htmlSubrecords = '';
$htmlElements = '';
$json = array();
$flagFabric = false;
// After action 'afterSave', it's necessary to reinitialize the FeSpecNative
if (!empty($latestFeSpecNative)) {
......@@ -198,11 +197,6 @@ abstract class AbstractBuildForm {
// <form>
if ($mode === FORM_LOAD) {
$htmlHead = $this->head();
if ((count(OnArray::filter($this->feSpecNative, FE_TYPE, FE_TYPE_ANNOTATE)) > 0) ||
(count(OnArray::filter($this->feSpecNative, FE_TYPE, FE_TYPE_IMAGE_CUT)) > 0)
) {
$flagFabric = true;
}
}
$filter = $this->getProcessFilter();
......@@ -234,7 +228,7 @@ abstract class AbstractBuildForm {
// <form>
if ($mode === FORM_LOAD) {
$htmlT3vars = $this->prepareT3VarsForSave();
$htmlTail = $this->tail($flagFabric);
$htmlTail = $this->tail();
$htmlSubrecords = $this->doSubrecords();
}
$htmlHidden = $this->buildAdditionalFormElements();
......@@ -553,6 +547,7 @@ abstract class AbstractBuildForm {
// Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($fe), STORE_SYSTEM);
$this->store->setVar(SYSTEM_FORM_ELEMENT_ID, $fe[FE_ID], STORE_SYSTEM);
// Fill STORE_LDAP
$fe = $this->prepareFillStoreFireLdap($fe);
......@@ -804,7 +799,7 @@ abstract class AbstractBuildForm {
/**
*
*/
abstract public function tail($flagFabric = false);
abstract public function tail();
/**
*
......@@ -2643,7 +2638,7 @@ abstract class AbstractBuildForm {
*
* Returned assoc array:
* title Only key. Element is non numeric, which is not a keyword 'width/nostrip/icon/url/mailto'
* width Key/Value Pair. Not provided for 'icon/url/mailto'.
* maxLength Key/Value Pair. Not provided for 'icon/url/mailto'.
* nostrip Only key. Do not strip HTML Tags from the content.
* icon Only key. Value will rendered (later) as an image.
* url Only key. Value will rendered (later) as a 'href'
......@@ -2693,8 +2688,9 @@ abstract class AbstractBuildForm {
$control[$attribute][$columnName] = $value;
}
if (!isset($control[SUBRECORD_COLUMN_TITLE][$columnName]))
if (!isset($control[SUBRECORD_COLUMN_TITLE][$columnName])) {
$control[SUBRECORD_COLUMN_TITLE][$columnName] = ''; // Fallback: Might be wrong, but better than nothing.
}
// Don't render Columns starting with '_...'.
if (substr($control[SUBRECORD_COLUMN_TITLE][$columnName], 0, 1) === '_') {
......
......@@ -512,7 +512,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
/**
* @return string
*/
public function tail($flagFabric = false) {
public function tail() {
$html = '';
$deleteUrl = '';
......@@ -554,8 +554,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
$dirtyAction = ($this->formSpec[F_DIRTY_MODE] == DIRTY_MODE_NONE) ? '' : "dirtyUrl: '$apiDir/dirty.php',";
$fabricJs = $flagFabric ? 'var qfqFabric = new QfqNS.Fabric(); qfqFabric.initialize($(".' . FABRIC_CSS_CLASS . '"));' : '';
$html .= '</form>'; // <form class="form-horizontal" ...
$html .= <<<EOF
<script type="text/javascript">
......@@ -575,8 +573,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
});
var qfqRecordList = new QfqNS.QfqRecordList('$apiDeletePhp');
$fabricJs
})
</script>
EOF;
......
......@@ -96,7 +96,7 @@ class BuildFormPlain extends AbstractBuildForm {
/**
* @return string
*/
public function tail($flagFabric = false) {
public function tail() {
$html = '';
// $html .= $this->buildNewSip();
......
......@@ -130,7 +130,7 @@ class BuildFormTable extends AbstractBuildForm {
/**
* @return string
*/
public function tail($flagFabric = false) {
public function tail() {
$html = '';
......
......@@ -79,6 +79,8 @@ const SANITIZE_DEFAULT = SANITIZE_ALLOW_DIGIT;
const SANITIZE_EXCEPTION = 'exception';
const SANITIZE_EMPTY_STRING = 'empty string';
const SANITIZE_VIOLATE = '!!';
// Index wrap setup table
const WRAP_SETUP_TITLE = 'title';
const WRAP_SETUP_ELEMENT = 'element';
......@@ -510,6 +512,7 @@ const SYSTEM_SQL_COUNT = 'sqlCount'; // Type: SANITIZE_DIGIT / Int.Number of ro
const SYSTEM_SQL_PARAM_ARRAY = 'sqlParamArray'; // Type: SANITIZE_ALL / Parameter of prepared SQL Statement. Useful for error reporting.
const SYSTEM_FORM = CLIENT_FORM; // '<formName> / <formId>'
const SYSTEM_FORM_ELEMENT = 'formElement'; // '<formElementName> / <formElementeId>'
const SYSTEM_FORM_ELEMENT_ID = 'formElementId'; // '<formElementName> / <formElementeId>'
const SYSTEM_FORM_ELEMENT_COLUMN = 'formElementColumn'; // '<columnname of current processed formElement>'
const SYSTEM_FORM_ELEMENT_MESSAGE = 'formElementMessage'; // '<columnname of current processed formElement>'
const SYSTEM_REPORT_COLUMN_INDEX = 'reportColumnIndex'; // Keyname of SQL-column processed at the moment.
......@@ -524,7 +527,7 @@ const DOWNLOAD_POPUP_REPLACE_TITLE = '#downloadPopupReplaceTitle#';
const SYSTEM_PARAMETER_LANGUAGE_FIELD_NAME = 'parameterLanguageFieldName';
const CSS_REQUIRED = 'required-field';
// die folgenden Elemente sind vermutlich nicht noetig, wenn Store Klassen gloable Vars benutzt.
// die folgenden Elemente sind vermutlich nicht noetig, wenn Store Klassen globale Vars benutzt.
//const SYSTEM_FORM_DEF = 'formDefinition'; // Type: SANITIZE_ALNUMX / AssocArray. Final form to process. Useful for error reporting.
//const SYSTEM_FORM_ELEMENT_DEF = 'formElementDefinition'; // Type: SANITIZE_ALL / AssocArray. Formelement which are processed at the moment. Useful for error reporting.
//const SYSTEM_FORM_ELEMENT_FIELD = 'formElementField'; // Type: SANITIZE_ALNUMX / String. Fieldname of processed Formelement. Useful for error reporting.
......@@ -766,7 +769,7 @@ const F_RECORD_LOCK_TIMEOUT_SECONDS = 'recordLockTimeoutSeconds';
const F_FE_DATA_PATTERN_ERROR = 'data-pattern-error';
const F_FE_DATA_REQUIRED_ERROR = 'data-required-error';
const F_FE_DATA_MATCH_ERROR = 'data-match-error';
const F_FE_DATA_MATCH_ERROR = 'data-match-error'; // contains id of the sibling input to check that i
const F_FE_DATA_ERROR = 'data-error';
const F_PARAMETER = 'parameter'; // valid for F_ and FE_
......
......@@ -115,6 +115,8 @@ class Evaluate {
$posFirstClose = strpos($result, $this->endDelimiter);
$this->store->setVar(SYSTEM_SQL_RAW, $line, STORE_SYSTEM);
while ($posFirstClose !== false) {
$posMatchOpen = strrpos(substr($result, 0, $posFirstClose), $this->startDelimiter);
......
......@@ -8,16 +8,19 @@
namespace qfq;
require_once(__DIR__ . '/../store/Store.php');
require_once(__DIR__ . '/UserFormException.php');
require_once(__DIR__ . '/../Constants.php');
require_once(__DIR__ . '/../store/Store.php');
require_once(__DIR__ . '/../store/T3Info.php');
require_once(__DIR__ . '/../store/Store.php');
require_once(__DIR__ . '/../report/Link.php');
require_once(__DIR__ . '/../database/Database.php');
require_once(__DIR__ . '/UserFormException.php');
class AbstractException extends \Exception {
public $messageArray = array();
public $store;
public $store = null;
protected $file = '';
protected $line = '';
......@@ -26,17 +29,24 @@ class AbstractException extends \Exception {
* @return string
*/
public function formatException() {
$t3Vars = array();
$htmlForm = '';
$debug = '';
try {
// In a very early stage, it might be possible that Store can't be initialized: take care not to use it.
$store = Store::getInstance();
$t3Vars = $store