Commit f7332d04 authored by bbaer's avatar bbaer
Browse files

Merge branch 'master' into bbaer_work

parents 7195f7da d3789e8e
......@@ -4,8 +4,8 @@ Neue Versionsnummer
1) Die aktuellen Commits anschauen und wichtige Topics uebernehmen (git log > ~/qfq.log, alles bis zum letzten TAG anschauen):
* qfq/extension/Documentation/5_Release.rst
* Den Inhalt von 5_Release.txt kopieren nach qfq/extension/RELEASE.txt.
* qfq/extension/Documentation/Release.rst
* Den Inhalt von Release.txt kopieren nach qfq/extension/RELEASE.txt.
2) In folgenden Files anpassen:
......@@ -17,16 +17,17 @@ Neue Versionsnummer
make t3sphinx (dadurch fallen Fehler in RESTdoc Syntax auf)
4) Neues ZIP bauen: make qfq.zip
4) Neues ZIP bauen: rm qfq.zip; make qfq.zip
5) Merge auf master Branch
Alles einchecken ausser 'NewVersion.md': in phpStorm 'git commit'
git checkout master
git merge crose_work
6) Neuen Tag vergeben: git tag 0.14.0
6) Neuen Tag vergeben: git tag 0.16.0
7) Alle Files, inkl. Tags, in GIT einchecken.
7) Alle Files, inkl. Tags, in GIT einchecken, u.a. NewVersion.md
8) Per PhpStorm Sync aller Files auf VM qfq
......
......@@ -123,10 +123,17 @@ Setup
file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js
}
.. _form-editor:
FormEditor
----------
Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content record of type *qfq*. In the bodytext insert the following code:
Setup a *report* to manage all *forms*:
* Create a Typo3 page.
* Set the 'URL Alias' to `form` (default) or the individual defined value in parameter EDIT_FORM_PAGE (config.qfq.ini).
* Insert a content record of type *qfq*.
* In the bodytext insert the following code:
::
......@@ -136,8 +143,8 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
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}}'=''
head = <table class="table table-hover">
sql = SELECT CONCAT('{{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>
rend = </tr></thead>
......@@ -146,7 +153,7 @@ Setup a *report* to manage all *forms*: Create a Typo3 page and insert a content
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('{{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>
......@@ -203,13 +210,22 @@ config.qfq.ini
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_ERROR |FORM_DATA_ERROR=generic error | Customizable error message used in validator.js. 'no specific' given |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_BS_COLUMNS | FORM_BS_COLUMNS=12 | The whole form will be wrapped in 'col-md-??'. Default is 12 for 100% |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_BS_LABEL_COLUMNS | FORM_BS_LABEL_COLUMNS = 3 | Default number of BS columns for the 'label'-column |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_BS_INPUT_COLUMNS | FORM_BS_INPUT_COLUMNS = 6 | Default number of BS columns for the 'input'-column |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_BS_NOTE_COLUMNS | FORM_BS_NOTE_COLUMNS = 3 | Default number of BS columns for the 'note'-column |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_BUTTON_ON_CHANGE_CLASS | FORM_BUTTON_ON_CHANGE_CLASS=alert-info btn-info | Color for save button after modification |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| BASE_URL_PRINT | BASE_URL_PRINT=http://example.com | URL where wkhtmltopdf will fetch the HTML (no parameter, those comes later)|
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| WKHTMLTOPDF | WKHTMLTOPDF=/usr/bin/wkhtmltopdf | Binary where to find wkhtmltopdf |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| EDIT_FORM_PAGE | EDIT_FORM_PAGE = form | T3 Pagealias to edit a form. |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
Example: *typo3conf/config.qfq.ini*
......@@ -229,15 +245,18 @@ Example: *typo3conf/config.qfq.ini*
;CSS_CLASS_QFQ_FORM =
CSS_CLASS_QFQ_FORM_PILL = qfq-color-grey-1
CSS_CLASS_QFQ_FORM_BODY = qfq-color-grey-2
;DATE_FORMAT= yyyy-mm-dd
;FORM_DATA_PATTERN_ERROR =
;FORM_DATA_REQUIRED_ERROR =
;FORM_DATA_MATCH_ERROR =
;FORM_DATA_ERROR =
;FORM_BS_COLUMNS = 12
;FORM_BS_LABEL_COLUMNS = 3
;FORM_BS_INPUT_COLUMNS = 6
;FORM_BS_NOTE_COLUMNS = 3
BASE_URL_PRINT=http://example.com
WKHTMLTOPDF=/usr/bin/wkhtmltopdf
;EDIT_FORM_PAGE = form
.. _local-documentation:
......@@ -348,7 +367,7 @@ Debug
* Form:
* For every internal link/button, show tooltips with decoded SIP on mouseover.
* Shows 'Edit form' (wrench symbol) button on a form.
* Shows an 'Edit form'-button (wrench symbol) on a form. The link points to the T3 page with the :ref:`form-editor`.
* Report: Will be configured per tt-content record.
......@@ -456,8 +475,6 @@ Sanitize class
| **all** | Form | Query | no sanitizing |
+------------------+------+-------+-----------------------------------------------------------------------------------------+
Store
=====
......@@ -651,7 +668,7 @@ Store: *TYPO3* (Bodytext) - T
+-------------------------+-------------------------------------------------------------------+----------+
* **note**: not available
* in 'dynamicUpdate' or
* in :ref:`dynamic-update` or
* by *FormElement* class 'action' with type 'beforeSave', 'afterSave', 'beforeDelete', 'afterDelete'.
.. _STORE_VARS:
......@@ -739,6 +756,8 @@ Store: *SYSTEM* - Y
+-------------------------+--------------------------------------------------------------------------+
| data-error | defined in config.ini or form definition |
+-------------------------+--------------------------------------------------------------------------+
| bsColumns | defined in config.ini (FORM_BS_COLUMNS) or form definition |
+-------------------------+--------------------------------------------------------------------------+
| bsLabelColumns | defined in config.ini (FORM_BS_LABEL_COLUMNS) or form definition |
+-------------------------+--------------------------------------------------------------------------+
| bsInputColumns | defined in config.ini (FORM_BS_INPUT_COLUMNS) or form definition |
......@@ -812,9 +831,9 @@ of the *Form*. If LDAP access is:
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLdapSearch | `(|(cn=*?*)(mail=*?*))` | Regular LDAP search expresssion | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLdapValuePrintf | `'%s / %s', cn, email` | Custom format to disply attributes, as value | x | x | TA |
| typeAheadLdapValuePrintf | `'%s / %s', cn, email` | Custom format to display attributes, as `value` | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLdapKeyPrintf | `'%s', email` | Custom format to disply attributes, as key | x | x | TA |
| typeAheadLdapIdPrintf | `'%s', email` | Custom format to display attributes, as `id` | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLimit | 20 (default) | Result will be limited to this number of entries | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
......@@ -843,14 +862,14 @@ The *FormElement.parameter*=*typeAheadLdap* will trigger LDAP searches on every
* *ldapBaseDn* = `ou=Addressbook,dc=example,dc=com`
* *typeAheadLdapSearch* = `(|(cn=*?*)(mail=*?*))`
* *typeAheadLdapValuePrintf* = `'%s / %s', cn, email`
* *typeAheadLdapKeyPrintf* = `'%s', email`
* *typeAheadLdapIdPrintf* = `'%s', email`
All fetched LDAP values will be formatted with:
* *typeAheadLdapValuePrintf*, shown to the user in a drop-down box and
* *typeAheadLdapKeyPrintf*, which represents the final data to save.
* *typeAheadLdapIdPrintf*, which represents the final data to save.
The `key/value` translation is compareable to a regular select drop-down box with key/value pairs.
Only attributes, defined in *typeAheadLdapValuePrintf* / *typeAheadLdapKeyPrintf* will be fetched from the LDAP directory.
The `id/value` translation is compareable to a regular select drop-down box with id/value pairs.
Only attributes, defined in *typeAheadLdapValuePrintf* / *typeAheadLdapIdPrintf* will be fetched from the LDAP directory.
To examine all possible values of an LDAP server, use the commandline tool `ldapsearch`. E.g.::
ldapsearch -x -h directory.example.com -L -b ou=Addressbook,dc=example,dc=com "(mail=john.doe@example.com)"
......@@ -989,11 +1008,11 @@ parameter
* The following parameter are optional and can be configured in the *Form.parameter* field.
* Comments: lines starting with a '#' are treated as a comment and will not be parsed.
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| Name | Type | Description |
+==========================+========+==========================================================================================================+
| bsColumns | int | Wrap the whole form in '<div class="col-md-??"> |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| maxVisiblePill | int | Show pills upto <maxVisiblePill> as button, all further in a drop-down menu. Eg.: maxVisiblePill=3 |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| class | string | HTML div with given class, surrounding the whole form. Eg.: class=container-fluid |
......@@ -1032,7 +1051,7 @@ parameter
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, roomnumber, telephonenumber` |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapKeyPrintf | string | Key formatting of LDAP result, per entry. E.g.: `'%s', mail` |
| typeAheadLdapIdPrintf | string | Key formatting of LDAP result, per entry. E.g.: `'%s', mail` |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLimit | int | Maximum number of entries. The limit is applied to the server (LDAP or SQL) and the Client |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
......@@ -1047,6 +1066,18 @@ parameter
* class = container-fluid
* classBody = qfq-form-right
.. _comment-space-character:
Comment- and space-character
''''''''''''''''''''''''''''
* Lines will be trimmed - leading and trailing spaces will be removed.
* If a leading and/or trailing space is needed, escape it: '\ hello world \' > ' hello world '.
* Lines starting with a '#' are treated as a comment and will not be parsed. Suche lines are treated as 'empty lines'
* The comment sign can be escaped with '\'
submitButtonText
''''''''''''''''
......@@ -1129,7 +1160,7 @@ FormElements
* Additional options to a *FormElement* will be configured via the *FormElement.parameter* field (analog to *Form.parameter*
for *Forms* ).
* Comments: lines starting with a '#' are treated as a comment and will not be parsed.
* See also: :ref:`comment-space-character`
.. _class-container:
......@@ -1562,7 +1593,7 @@ the server, the lookup will be performed and the result, upto *typeAheadLimit* e
* *typeAheadLimit* = <number>. Max numbers of result records to be shown. Default is 20.
* *typeAheadMinLength* = <number>. Minimum length to type before the first lookup starts.
Depending of the `typeahead` setup, the given FormElement will contain the displayed `value` or `key` (if a key/value dict is
Depending of the `typeahead` setup, the given FormElement will contain the displayed `value` or `id` (if an id/value dict is
configured).
Configuration via Form / FormElement
......@@ -1576,9 +1607,10 @@ SQL
* *FormElement.parameter*:
* *typeAheadSql* = `SELECT ... AS 'key', ... AS 'value' WHERE name LIKE ? OR firstName LIKE ? LIMIT 100`
* *typeAheadSql* = `SELECT ... AS 'id', ... AS 'value' WHERE name LIKE ? OR firstName LIKE ? LIMIT 100`
* If there is only one column in the SELECT statement, that one will be used and there is no dict (key/value pair).
* If there is no column `id` or no column `value`, than the first column becomes `id` and the second column becomes `value`.
* The query will be fired as a 'prepared statement'.
* The value, typed by the user, will be replaced on all places where a `?` appears.
* All `?` will be automatically surrounded by '%'. Therefore wildcard search is implemented: `... LIKE '%<?>%' ...`
......@@ -2084,7 +2116,7 @@ Type: sendmail
Dynamic Update
--------------
The 'Dynamic Update' feature makes a form more interactive. If a user change a *FormElement* who is tagged with
The 'Dynamic Update' feature makes a form more interactive. If a user changes a *FormElement* who is tagged with
'dynamicUpdate', *all* elements who are tagged with 'dynamicUpdate', will be recalculated and rerendered.
The following fields will be recalculated during 'Dynamic Update'
......@@ -2098,6 +2130,15 @@ The following fields will be recalculated during 'Dynamic Update'
To make a form dynamic:
* Mark all *FormElements* with `dynamic update`=`enabled`, which should **initiate** or **receive** updates.
See #3426 / Dynamic Update: Inputs loose the new content and shows the old value:
* On **all** `dynamic update` *FormElements* an explicit definition of `value`, including a sanatize class, is necessary
(except the field is numeric). **A missing definition let's the content overwrite all the time with the old value**.
A typical definition for `value` looks like::
{{<FormElement name>::alnumx}}
* Define the receiving *FormElements* in a way, that they will interpret the recent user change! The form variable of the
specific sender *FormElement* `{{<sender element>:F:<sanitize>}}` should be part of one of the above fields to get an
impact. E.g.:
......@@ -2105,8 +2146,9 @@ To make a form dynamic:
[receiving *FormElement*].parameter: itemList={{ SELECT IF({{carPriceRange:FE:alnumx}}='expensive','Ferrari,Tesla,Jaguar','General Motors,Honda,Seat,Fiat') }}
Remember to specify a 'sanatize' class - a missing sanatize class means 'digit', every content which is not numeric
violate the sanatize class and becomes therefore an empty string!
Remember to specify a 'sanatize' class - a missing sanatize class means 'digit', every content, which is not numeric,
violates the sanatize class and becomes therefore an empty string!
Examples
^^^^^^^^
......@@ -2679,7 +2721,7 @@ Table: Person
# Typeahead
typeAheadLdapSearch = (|(cn=*?*)(mail=*?*))
typeAheadLdapValuePrintf ‘%s / %s’, cn, email
typeAheadLdapKeyPrintf ‘%s’, email
typeAheadLdapIdPrintf ‘%s’, email
# dynamicUpdate: show note
fillStoreLdap
......
......@@ -15,12 +15,54 @@ Features
Bug Fixes
^^^^^^^^^
Version 0.14
Version 0.15
------------
GIT Last Commit: Sun Mar 19 20:38:18 2017 +0100
Changes
^^^^^^^
* Play formEditor.sql.
* Form 'FormElement' failed to display the formtitle of the current form in case of a new FE.
* Updated subrecord in 'Form' for 'FormElements' - columns 'size' and 'sql1' removed and 'dyn' inserted. Play formEditor.sql.
* #3431, Parameter keyword 'typeAheadLdapKeyPrintf' changed to 'typeAheadLdapIdPrintf'.::
UPDATE FormElement SET parameter = REPLACE(parameter, 'typeAheadLdapKeyPrintf', 'typeAheadLdapIdPrintf')
Features
^^^^^^^^
* Introduce new config.qfq.ini setting 'EDIT_FORM_PAGE' - by default set to 'form' - the wrench symbol on every Form
will direct to that page. Fix #3420 / Quicklink 'editform' on form: directs to the current T3 page which might be insufficient.
* Form 'subrecord' columns: the default width limit of 20 chars are disabled if 'nostrip' is specifed.
* #3431 / typeAheadSql: columnname 'key' is a reserverd SQL statement - replace by 'id'. Additional the parametername
'typeAheadLdapKeyPrintf' renamed to 'typeAheadLdapIdPrintf'. By using 'id' instead of 'key' the quoting of the columnname
is not necessary anoymore.
Bug Fixes
^^^^^^^^^
* Fix #3419 / typeAheadSql: Array with only one column or non standard columnnames are not handeld properbly.
Detection of missing LIMIT implemented.
* #3425 / Form.parameter, FormElement.parameter: comment handling, trailing & leading spaces
Manual.rst: commented handling of 'comment character' and 'escaping of leading/trailing spaces'
Support.php: new funtion handleEscapeSpaceComment().
* Evaluate.php: parse all F|FE.parameter via handleEscapeSpaceComment(). A leading '#' or ' ' might be escaped by '\'.
* Saving 'extra' FE in STORE_SIP has been done with inappropiate FE_NAME. Correct is the pure FE_NAME, without any
extension like recordId. Unessary and broken decoding removed.
* #3426 | Dynamic Update: Inputs loose the new content and shows the old value
* Through fix #2064 the FE.checkType has not been used anymore. This is fixed now.
* #3433 | templateGroup on primary Record: Values of removed copies are not deleted. The new implementation creates empty
fake instances of all copies of templateGroup FormElements. Those are empty. Before save, the submitted form values
will be expanded with the empty fake templateGroup FormElements and such empty values will be saved.
Version 0.14
------------
Changes
^^^^^^^
......@@ -34,7 +76,7 @@ Changes
* FormElement.placeholder colum width extended to 512:
ALTER TABLE `FormElement` CHANGE `placeholder` `placeholder` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `FormElement` CHANGE `placeholder` `placeholder` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''
* New class Ldap.php.
......@@ -46,7 +88,11 @@ Features
* Character Count: Display a `counter` on input or textarea fields, activated by specifying the formElement.parameter 'characterCountWrap'.
* Evaluate.php: Two new escape options 'l' and 'L'. Backport of ldap_escape() for PHP <5.6. Multiple escaping for one value now possible.
* Manual.rst: add some example for TypeAhead and for saving LDAP value.
* Load foreign values in templatGroups - saving is not implemented yet.
* Manual: Added howto prevent <p>-wrap in TinyMCE
* TemplateGroup: Add button now disabled if max. number of copies reached.
* #3414/QuickFormQuery.php: wrap whole form in 'col-md-XX' - User controls the width of an QFQ form.
Bug Fixes
^^^^^^^^^
......@@ -57,7 +103,9 @@ Bug Fixes
* BuildFormBootstrap.php: wrapping of optional 'submitButtonText' now done with the 'per form' values.
* typeahead.php: if there is an exception, the message body is sent as regular 'content' for the drop-down box. At the
moment this is the only way to transmit any error messages.
* formEditor.sql: removed all 'maxLength' string values for 'Form' and 'FormElement' forms.
* Save button becomes active if a templateGroup copy is removed.
* #3413 Form ohne Pill hat kein padding am Rand. Fix: if there are no pills, an additinal col-md-12 will be rendered.
Version 0.13
......@@ -134,7 +182,7 @@ Changes
ALTER TABLE `FormElement` CHANGE `type` `type` ENUM( 'checkbox', 'date', 'datetime', 'dateJQW', 'datetimeJQW', 'extra',
'gridJQW', 'text', 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
'templateGroup', 'beforeLoad', 'beforeSave', 'beforeInsert', 'beforeUpdate', 'beforeDelete', 'afterLoad', 'afterSave',
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'text';
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'text'
* formEditor.sql: Added HTML 'placeholder' in FormEditor for bs*Columns.
......@@ -150,7 +198,7 @@ Changes
* Name of variable '_filename' (used in field 'parameter') has changed. Old: '_filename', New: 'filename'
* UPDATE `FormElement` SET parameter = REPLACE(parameter, '_filename', 'filename')
* UPDATE `FormElement` SET parameter = REPLACE(parameter, "_filename", "filename")
Features
......
......@@ -6,8 +6,8 @@
conf.py:
copyright: 2017
project: QFQ Extension
version: 0.13.0
release: 0.13.0
version: 0.15.0
release: 0.15.0
latex_documents:
- - Index
- qfq.tex
......
......@@ -57,9 +57,9 @@ copyright = u'2017, Carsten Rose'
# built documents.
#
# The short X.Y version.
version = '0.13'
version = '0.15'
# The full version, including alpha/beta/rc tags.
release = '0.13.0'
release = '0.15.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
Release
=======
Version 0.15
------------
Changes
^^^^^^^
* Play formEditor.sql.
* Form 'FormElement' failed to display the formtitle of the current form in case of a new FE.
* Updated subrecord in 'Form' for 'FormElements' - columns 'size' and 'sql1' removed and 'dyn' inserted. Play formEditor.sql.
* #3431, Parameter keyword 'typeAheadLdapKeyPrintf' changed to 'typeAheadLdapIdPrintf'.::
UPDATE FormElement SET parameter = REPLACE(parameter, 'typeAheadLdapKeyPrintf', 'typeAheadLdapIdPrintf')
Features
^^^^^^^^
* Introduce new config.qfq.ini setting 'EDIT_FORM_PAGE' - by default set to 'form' - the wrench symbol on every Form
will direct to that page. Fix #3420 / Quicklink 'editform' on form: directs to the current T3 page which might be insufficient.
* Form 'subrecord' columns: the default width limit of 20 chars are disabled if 'nostrip' is specifed.
* #3431 / typeAheadSql: columnname 'key' is a reserverd SQL statement - replace by 'id'. Additional the parametername
'typeAheadLdapKeyPrintf' renamed to 'typeAheadLdapIdPrintf'. By using 'id' instead of 'key' the quoting of the columnname
is not necessary anoymore.
Bug Fixes
^^^^^^^^^
* Fix #3419 / typeAheadSql: Array with only one column or non standard columnnames are not handeld properbly.
Detection of missing LIMIT implemented.
* #3425 / Form.parameter, FormElement.parameter: comment handling, trailing & leading spaces
Manual.rst: commented handling of 'comment character' and 'escaping of leading/trailing spaces'
Support.php: new funtion handleEscapeSpaceComment().
* Evaluate.php: parse all F|FE.parameter via handleEscapeSpaceComment(). A leading '#' or ' ' might be escaped by '\'.
* Saving 'extra' FE in STORE_SIP has been done with inappropiate FE_NAME. Correct is the pure FE_NAME, without any
extension like recordId. Unessary and broken decoding removed.
* #3426 | Dynamic Update: Inputs loose the new content and shows the old value
* Through fix #2064 the FE.checkType has not been used anymore. This is fixed now.
* #3433 | templateGroup on primary Record: Values of removed copies are not deleted. The new implementation creates empty
fake instances of all copies of templateGroup FormElements. Those are empty. Before save, the submitted form values
will be expanded with the empty fake templateGroup FormElements and such empty values will be saved.
Version 0.14
------------
Changes
^^^^^^^
* Play formEditor.sql.
* All Form & FormEditor input elements now have a maxlength definition of 0, which means take the column definition value.
* Drop-down list of container assignment:
* Display 'type' ('pill', 'fieldset', 'templategroup') instead of 'class' (always 'container').
* Display 'name' (internal name) instead of 'label' (shown on the website and might not so usefull as 'name' which is nowhere else used than in that drop-down.
* FormElement.placeholder colum width extended to 512:
ALTER TABLE `FormElement` CHANGE `placeholder` `placeholder` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''
* New class Ldap.php.
Features
^^^^^^^^
* Typeahead for SQL and LDAP Datasources implemented.
* formEditor.sql: Changed width of column FormElement.placeholder from 255 to 512. Removed hardcoded 'size' in FormElement 'placeholder'.
* Character Count: Display a `counter` on input or textarea fields, activated by specifying the formElement.parameter 'characterCountWrap'.
* Evaluate.php: Two new escape options 'l' and 'L'. Backport of ldap_escape() for PHP <5.6. Multiple escaping for one value now possible.
* Manual.rst: add some example for TypeAhead and for saving LDAP value.
* Load foreign values in templatGroups - saving is not implemented yet.
* Manual: Added howto prevent <p>-wrap in TinyMCE
* TemplateGroup: Add button now disabled if max. number of copies reached.
* #3414/QuickFormQuery.php: wrap whole form in 'col-md-XX' - User controls the width of an QFQ form.
Bug Fixes
^^^^^^^^^
* Dynamic Update has been broken since implementing of 'element-update' (#3180). Now both methods, 'element-update' and 'form-update' should be fine.
* qfq-bs.css.less: Fixed problem with 'typeahead input elements' not expanded to Bootstrap column width. Changed
Layout/Design Typeahead drop-down box. Add hoover for the drop-down box with a blue background
* AbstractBuildForm.php: #3374 - textarea elements now contains 'maxlength' attribute.
* BuildFormBootstrap.php: wrapping of optional 'submitButtonText' now done with the 'per form' values.
* typeahead.php: if there is an exception, the message body is sent as regular 'content' for the drop-down box. At the
moment this is the only way to transmit any error messages.
* formEditor.sql: removed all 'maxLength' string values for 'Form' and 'FormElement' forms.
* Save button becomes active if a templateGroup copy is removed.
* #3413 Form ohne Pill hat kein padding am Rand. Fix: if there are no pills, an additinal col-md-12 will be rendered.
Version 0.13
------------
......@@ -75,7 +168,7 @@ Changes
ALTER TABLE `FormElement` CHANGE `type` `type` ENUM( 'checkbox', 'date', 'datetime', 'dateJQW', 'datetimeJQW', 'extra',
'gridJQW', 'text', 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
'templateGroup', 'beforeLoad', 'beforeSave', 'beforeInsert', 'beforeUpdate', 'beforeDelete', 'afterLoad', 'afterSave',
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'text';
'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'text'
* formEditor.sql: Added HTML 'placeholder' in FormEditor for bs*Columns.
......@@ -89,9 +182,10 @@ Changes
* UPDATE EXISTING TypoScript TEMPLATES of QFQ Installation.
* Variable field parameter has changed. old '_filename', new 'filename'
* Name of variable '_filename' (used in field 'parameter') has changed. Old: '_filename', New: 'filename'
* UPDATE `FormElement` SET parameter = REPLACE(parameter, "_filename", "filename")
* UPDATE `FormElement` SET parameter = REPLACE(parameter, '_filename', 'filename')
Features
^^^^^^^^
......
......@@ -37,6 +37,9 @@ DATE_FORMAT = yyyy-mm-dd
;FORM_DATA_MATCH_ERROR =
;FORM_DATA_ERROR =
; Default width of whole form
;FORM_BS_COLUMNS = 12
; Default size for Bootstrap Form Elements
;FORM_BS_LABEL_COLUMNS = 3
;FORM_BS_INPUT_COLUMNS = 6
......@@ -45,3 +48,5 @@ DATE_FORMAT = yyyy-mm-dd
; Configure URL where `wkhtmltopdf` fetches pages and produces PDFs
BASE_URL_PRINT = http://example.com/
WKHTMLTOPDF = /opt/wkhtmltox/bin/wkhtmltopdf
;EDIT_FORM_PAGE = form
\ No newline at end of file
......@@ -10,5 +10,5 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase',
'clearcacheonload' => true,
'state' => 'alpha',
'version' => '0.13.0'
'version' => '0.15.0'
);
\ No newline at end of file
......@@ -26,7 +26,7 @@ try {
} catch (\Exception $e) {
// $answer[API_MESSAGE] = "Generic Exception: " . $e->getMessage();
$answer[] = [API_TYPEAHEAD_KEY => 'errror', API_TYPEAHEAD_VALUE => "Error: " . $e->getMessage()];
$answer[] = [API_TYPEAHEAD_KEY => 'Error', API_TYPEAHEAD_VALUE => "Error: " . $e->getMessage()];
}
header("Content-Type: application/json");
......
......@@ -229,7 +229,7 @@ abstract class AbstractBuildForm {
}
$queryStringArray = [
'id' => $this->store->getVar(TYPO3_PAGE_ID, STORE_TYPO3),
'id' => $this->store->getVar(SYSTEM_EDIT_FORM_PAGE, STORE_SYSTEM),
'form' => 'form',
'r' => $this->formSpec['id']
];
......@@ -340,7 +340,7 @@ abstract class AbstractBuildForm {
* @param array $json
* @param string $modeCollectFe
* @param bool $htmlElementNameIdZero
* @param string $storeUse
* @param string $storeUseDefault
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
* @return string
* @throws CodeException
......@@ -349,7 +349,7 @@ abstract class AbstractBuildForm {
*/
public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE, $feIdContainer = 0, array &$json,
$modeCollectFe = FLAG_DYNAMIC_UPDATE, $htmlElementNameIdZero = false,
$storeUse = STORE_USE_DEFAULT, $mode = FORM_LOAD) {
$storeUseDefault = STORE_USE_DEFAULT, $mode = FORM_LOAD) {
$html = '';
$flagOutput = false;
......@@ -368,6 +368,7 @@ abstract class AbstractBuildForm {
// Iterate over all FormElements
foreach ($this->feSpecNative as $fe) {
$storeUse = $storeUseDefault;
if (($filter === FORM_ELEMENTS_NATIVE && $fe[FE_TYPE] === 'subrecord')
|| ($filter === FORM_ELEMENTS_SUBRECORD && $fe[FE_TYPE] !== 'subrecord')
......@@ -425,10 +426,12 @@ abstract class AbstractBuildForm {
// }
if ($value === '') {
// Only take the default, if the FE is a real tablecolumn. See #2064
if ($this->store->getVar($formElement[FE_NAME], STORE_TABLE_COLUMN_TYPES) !== false) {
$value = $this->store->getVar($name, $storeUse, $formElement['checkType']);
// #2064 / Only take the default, if the FE is a real tablecolumn.
// #3426 / Dynamic Update: Inputs loose the new content and shows the old value.
if ($storeUse == STORE_USE_DEFAULT && $this->store->getVar($formElement[FE_NAME], STORE_TABLE_COLUMN_TYPES) === false) {
$storeUse = str_replace(STORE_TABLE_DEFAULT, '', $storeUse); // Remove STORE_DEFAULT
}
$value = $this->store->getVar($name, $storeUse, $formElement['checkType']);
}
// Typically: $htmlElementNameIdZero = true
......@@ -436,7 +439,6 @@ abstract class AbstractBuildForm {
$htmlFormElementName = HelperFormElement::buildFormElementName($formElement[FE_NAME], ($htmlElementNameIdZero) ? 0 : $recordId);
$formElement[FE_HTML_ID] = HelperFormElement::buildFormElementId($this->formSpec[F_ID], $formElement[FE_ID], ($htmlElementNameIdZero) ? 0 : $recordId, 0);
// Construct Marshaller Name: buildElement
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]];
......@@ -496,7 +498,7 @@ abstract class AbstractBuildForm {
if (isset($formElement[FE_FILL_STORE_LDAP]) || isset($formElement[FE_TYPEAHEAD_LDAP])) {
$keyNames = [F_LDAP_SERVER, F_LDAP_BASE_DN, F_LDAP_ATTRIBUTES, F_LDAP_SEARCH, F_TYPEAHEAD_LDAP_SEARCH, F_TYPEAHEAD_LIMIT,
F_TYPEAHEAD_MINLENGTH, F_TYPEAHEAD_LDAP_VALUE_PRINTF, F_TYPEAHEAD_LDAP_KEY_PRINTF, F_LDAP_TIME_LIMIT];
F_TYPEAHEAD_MINLENGTH, F_TYPEAHEAD_LDAP_VALUE_PRINTF, F_TYPEAHEAD_LDAP_ID_PRINTF, F_LDAP_TIME_LIMIT];
$formElement = OnArray::copyArrayItemsIfNotAlreadyExist($this->formSpec, $formElement, $keyNames);
} else