Commit 4ee6228a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch master. First functional 'monitor' version.

parents 1d6095ba 920f3ec3
......@@ -36,6 +36,63 @@ Features
Bug Fixes
^^^^^^^^^
Version 18.6.0
--------------
Date: 13.06.2018
Notes
^^^^^
* config.qfq.ini migrated to config.qfq.php - the old config.qfq.ini get's `chmod 000`.
* Most of config.qfq.ini migrated to Typo3 / Extension Manager - all but the DB /LDAP credentials.
* Keep in config.qfq.ini: ::
# Rename DB credentials from DB_<key> to DB_1_<key>, with key = 'NAME|HOST|USER|PASSWORD'
DB_1_USER = ...
DB_1_SERVER = ...
DB_1_PASSWORD = ...
DB_1_NAME = ...
* NEW: Drag and drop to sort elements! Check the Manual.
* `URL forwardMode`
* `client` renamed to `auto`.
* `close` added.
Features
^^^^^^^^
* #6100 / Url Forward Auto: Update Manual.rst. The F.parameter.saveAndClose has been removed again. Mode 'close' can be assigned statically or dynamic.
* #6178 / Input: Step: New option 'step' for FE.parameter.
* Download.php: references to non existing files now reported as missing file, not 'wrong mimetype' anymore.
* #4918 / Drag'n'Drop reorder elements DRAGANDDROP.md, PROTOCOL.md: Doc for "drag'n' drop" implementation.
dragAndDrop.php: API endpoint DragAndDrop.php: Class for implementing drag'n' drop functionality.
Link.php: implement new renderMode=8 - returning only the sip. QuickFormQuery.php: New entry point for processing "drag'n' drop".
* #3971 / Form title: new design from form title
Bug Fixes
^^^^^^^^^
* #5077 / Dynamic Update & FE.type=required: Server fixed -
a) dynamic calculated modeSql respected,
b) formModeGlobal=requiredOff respected,
c) dynamic FE with mode='hidden' are not saved anymore.
* #6176 / Icon not aligned when error text: Buttons now wrapped in one 'input-group'.
* Manual.rst: reformat autocron QFQ code
* #5880 / Skip Error Message during dynamicUpdate
* #5870 / Missing file config.qfq.ini: Clean QFQ message
* #5924 / config.qfq.ini/LocalConfiguration.php: several places in formEditor.sql still contained the 'dbIndex...'
instead of 'index...'. fixed.
* #6168 Configuration language setting ignored: Form and FormElement editor still used uppercase config values for
language configuration. Updated to the new camel case notation.
* #5890 / config.qfq.ini is public readable. Renamed file to config.qfq.php. Implement a basic migration assistant to
copy DB credentials to new config.qfq.php. All other values have to be copied to extmanager/qfq-configuration manually.
* #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.
Version 18.4.4
--------------
......@@ -119,7 +176,7 @@ Features
Bug Fixes
^^^^^^^^^
* #5706 Fixed that problematic characters in 'fileDestination' has not been sanatized.
* #5706 / Fixed that problematic characters in 'fileDestination' has not been sanatized.
* Fixed problem with buttons clipping trough alert
* Client: wrong variable, updated CSS for long errors
......
......@@ -11,7 +11,7 @@ RELEASE_DATE = $(shell date '+%Y%m%d%H%M')
GIT_REVISION_SHORT = $(shell git rev-parse --short HEAD || true)
GIT_REVISION_LONG = $(shell git rev-parse HEAD || true)
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png ext_conf_template.txt config.qfq.example.ini RELEASE.txt
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png ext_conf_template.txt config.qfq.example.php RELEASE.txt
DISTDIR=dist
......
# Drag And Drop
## Sort
Initialize a dnd container by adding the class "qfq-dnd"
Set container object class to `class="qfq-dnd qfq-dnd-sort"`.
Add the data elements: `data-dnd-api="url"` and `data-dnd-key="key"`.
For the children inside of the container (just the first children):
add `data-dnd-id` to a reference you can handle (probably record id).
Request will be sent containing following GET variables:
* dragId = `data-dnd-id` of the dragged object,
* dragPosition = client internal old position of the dragged object.
* setTo = "after" or "before",
* hoverId = `data-dnd-id` id of the element the dragged element is now hovering, meaning before or after.
* hoverPosition = client internal position of currently hovered element.
Example: http://something/bla?dragId=uno&dragPosition=1&setTo=before&hoverId=tre&hoverPosition=3
\ No newline at end of file
......@@ -47,8 +47,8 @@ Neue Versionsnummer
6) **New Tag**:
git tag v18.4.4
git push -u origin v18.4.4
git tag v18.6.0
git push -u origin v18.6.0
7) PhpStorm: **Sync** all files to VM qfq.
......
......@@ -224,18 +224,22 @@ The format of redirect information is outlined below
{
...
"redirect": "no" | "url" | "url-skip-history" | "client"
"redirect": "no" | "url" | "url-skip-history" | "auto" | "close"
"redirect-url": "<url>"
...
}
`"redirect"`
: type of redirection. `"no"` advises the Client to stay on the
Current Page. `"client"` advises the Client to decide where to
redirect to. `"url"` advices the Client to redirect to the URL
provided in `"redirect-url"`. `"url-skip-history"` behaves like
`"url"` but the current page will skip the browser history.
: type of redirection.
* `"no"` advises the Client to stay on the Current Page.
* `"close"` the client goes back one in history - if there is no history, stays on the same page.
* `"auto"` the Client decide where to redirect to.
* if the user clicks 'save', stay on the same page.
* if the user clicks 'close', go back one in history - if there is no history, stays on the same page.
* `"url"` advices the Client to redirect to the URL provided in `"redirect-url"`.
* `"url-skip-history"` behaves like `"url"` but the current page will skip the browser history.
`"redirect-url"`
: Used to provide an URL when `"redirect"` is set to `"url"`. It
......@@ -479,7 +483,7 @@ JSON Response from the server (extended [Minimal Response]) containing:
{
"status": "success"|"error"|"conflict"|"conflict_allow_force",
"message": "<message>"
"message": "<message>"e5
}
`status` indicates how the request has been fulfilled by the server.
......@@ -489,6 +493,29 @@ On `"conflict"` the Client opens the alert as modal dialog (user can't change an
form' button.
On `"conflict_allow_force"` the Client opens the alert non-modal (default).
### Drag And Drop (sort)
Request
: api/dragAndDrop.php
Request Method
: GET
URL Parameters:
: `s=<SIP>` (`form=<formname>`)
:
: `dragId=<data-dnd-id of dragged element>`
: `dragPosition=<client internal position (numbering) of element before dragging>`
: `setTo=before`, `setTo=after`
: `hoverId=<data-dnd-id of dragged element>`
: `hoverPosition=<client internal position (numbering) of element after dragging>`
Server Response
: The response contains at least a [Minimal Response]. In addition, a
[HTML Element Update] may be included.
## Glossary
SIP
......
......@@ -13,8 +13,17 @@ require_once(__DIR__ . '/../../qfq/qfq/exceptions/UserReportException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/CodeException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/DbException.php');
/**
* Class QfqController
* @package IMATHUZH\Qfq\Controller
*/
class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* @return string
* @throws qfq\CodeException
* @throws qfq\UserFormException
*/
public function showAction() {
$origErrorReporting = '';
......
......@@ -150,6 +150,8 @@ via commandline options. A basic HTML email support is implemented.
The latest version is v1.56, which has at least one bug. That one is patched in the QFQ internal version v1.56p1 (see
QFQ GIT sources in directory 'patches/sendEmail.patch').
Nevertheless, on latest system the TLS support is broken - please check _`sendEmailProblem`.
The Typo3 sendmail eco-system is not used at all by QFQ.
Thumbnail
......@@ -172,7 +174,7 @@ Setup
* If the Extensionmanager stops after importing: check your memory limit in php.ini.
* Copy/rename the file *<site path>/typo3conf/ext/qfq/config.example.qfq.ini* to *config.qfq.in*.
* Copy/rename the file *<site path>/typo3conf/ext/qfq/config.example.qfq.php* to *config.qfq.php*.
Configure the necessary settings `configuration`_
The configuration file is outside the of extension directory, to not loose it during updates.
* When the QFQ Extension is called the first time on the Typo3 Frontend, the file *<ext_dir>/qfq/sql/formEditor.sql* will
......@@ -226,9 +228,7 @@ 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 `editFormPage` (configuration_).
* Insert a content record of type *qfq*.
* In the bodytext insert the following code:
::
* In the bodytext insert the following code: ::
# If there is a form given by SIP: show
form={{form:SE}}
......@@ -300,7 +300,7 @@ Extension Manager: QFQ Configuration
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| sendEMailOptions | -o tls=yes | General options. Check: http://caspian.dotconf.net/menu/Software/SendEmail |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| dateFormat | yyyy-mm-dd | Possible options: yyyy-mm-dd, dd.mm.yyyy |
| dateFormat | yyyy-mm-dd | Possible options: yyyy-mm-dd, dd.mm.yyyy. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| Dynamic |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
......@@ -334,44 +334,44 @@ Extension Manager: QFQ Configuration
| | | time QFQ is called - *not* recommended! |
| | | 'never': never apply DB Updates. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| indexData | 1 | Optional. Default: 1. Retrieve the current setting via {{_dbNameData:Y}} |
| indexData | 1 | Optional. Default: 1. Retrieve the current setting via {{_dbNameData:Y}}. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| indexQfq | 1 | Optional. Default: 1. Retrieve the current setting via {{_dbNameQfq:Y}} |
| indexQfq | 1 | Optional. Default: 1. Retrieve the current setting via {{_dbNameQfq:Y}}. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| Security |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| escapeTypeDefault | m | All variables `{{...}}` get this escape class by default. |
| | | See `variable-escape`_. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| securityVarsHoneypot | email,username,password | If empty: no check. All named variables will rendered as INPUT elements |
| securityVarsHoneypot | email,username,password | If empty: no check. All named variables will rendered as INPUT elements. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| securityAttackDelay | 5 | If an attack is detected, sleep 'x' seconds and exit PHP process |
| securityAttackDelay | 5 | If an attack is detected, sleep 'x' seconds and exit PHP process. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| securityShowMessage | true | If an attack is detected, show a message |
| securityShowMessage | true | If an attack is detected, show a message. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| securityGetMaxLength | 50 | GET vars longer than 'x' chars triggers an `attack-recognized`. |
| | | `ExceptionMaxLength`_ |
| | | `ExceptionMaxLength`_. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| Form-Config |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| recordLockTimeoutSeconds | 900 | Timeout for record locking. After this time, a record will be replaced |
| recordLockTimeoutSeconds | 900 | Timeout for record locking. After this time, a record will be replaced. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| enterAsSubmit | enterAsSubmit = 1 | 0: off, 1: Pressing *enter* in a form means *save* and *close* |
| enterAsSubmit | enterAsSubmit = 1 | 0: off, 1: Pressing *enter* in a form means *save* and *close*. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| editFormPage | form | T3 Pagealias to edit a form. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formDataPatternError | please check pattern error | Customizable error message used in validator.js. 'pattern' violation |
| formDataPatternError | please check pattern error | Customizable error message used in validator.js. 'pattern' violation. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formDataRequiredError | missing value | Customizable error message used in validator.js. 'required' fields |
| formDataRequiredError | missing value | Customizable error message used in validator.js. 'required' fields. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formDataMatchError | type error | Customizable error message used in validator.js. 'match' retype mismatch |
| formDataMatchError | type error | Customizable error message used in validator.js. 'match' retype mismatch. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formDataError | generic error | Customizable error message used in validator.js. 'no specific' given |
| formDataError | generic error | Customizable error message used in validator.js. 'no specific' given. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| Form-Layout |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cssClassQfqContainer | container | QFQ with own Bootstrap: 'container'. |
| | | QFQ already nested in Bootstrap of mainpage: <empty> |
| | | QFQ already nested in Bootstrap of mainpage: <empty>. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cssClassQfqForm | qfq-color-base | Wrap around QFQ 'Form'. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
......@@ -379,21 +379,21 @@ Extension Manager: QFQ Configuration
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| cssClassQfqFormBody | qfq-color-grey-2 | Wrap around FormElements: CSS Class, typically a background color. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formBsColumns | 12 | The whole form will be wrapped in 'col-md-??'. Default is 12 for 100% |
| formBsColumns | 12 | The whole form will be wrapped in 'col-md-??'. Default is 12 for 100%. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formBsLabelColumns | 3 | Default number of BS columns for the 'label'-column |
| formBsLabelColumns | 3 | Default number of BS columns for the 'label'-column. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formBsInputColumns | 6 | Default number of BS columns for the 'input'-column |
| formBsInputColumns | 6 | Default number of BS columns for the 'input'-column. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| formBsNoteColumns | 3 | Default number of BS columns for the 'note'-column |
| formBsNoteColumns | 3 | Default number of BS columns for the 'note'-column. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| extraButtonInfoInline | <img src="info.png"> | Image for `extraButtonInfo`_ (inline) |
| extraButtonInfoInline | <img src="info.png"> | Image for `extraButtonInfo`_ (inline). |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| extraButtonInfoBelow | <img src="info.png"> | Image for `extraButtonInfo`_ (below) |
| extraButtonInfoBelow | <img src="info.png"> | Image for `extraButtonInfo`_ (below). |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| extraButtonInfoPosition | below | 'auto' (default) or 'below'. See `extraButtonInfo`_ |
| extraButtonInfoPosition | below | 'auto' (default) or 'below'. See `extraButtonInfo`_. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| extraButtonInfoClass | pull-right | '' (default) or 'pull-right'. See `extraButtonInfo`_ |
| extraButtonInfoClass | pull-right | '' (default) or 'pull-right'. See `extraButtonInfo`_. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| Form-Language |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
......@@ -405,41 +405,45 @@ Extension Manager: QFQ Configuration
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonTooltip | Save | Tooltip on the form save button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for save button on top of the form |
| saveButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for save button on top of the form. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonClassOnChange | alert-info btn-info | Bootstrap CSS class for save button showing 'data changed' |
| saveButtonClassOnChange | alert-info btn-info | Bootstrap CSS class for save button showing 'data changed'. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| saveButtonGlyphIcon | glyphicon-ok | Icon for the form save button |
| saveButtonGlyphIcon | glyphicon-ok | Icon for the form save button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonText | - | Text on the form close button. Typically none. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonTooltip | close | Tooltip on the form close button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for close button on top of the form |
| closeButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for close button on top of the form. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| closeButtonGlyphIcon | glyphicon-remove | Icon for the form close button |
| closeButtonGlyphIcon | glyphicon-remove | Icon for the form close button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonText | - | Text on the form delete button. Typically none. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonTooltip | delete | Tooltip on the form delete button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for delete button on top of the form |
| deleteButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for delete button on top of the form. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| deleteButtonGlyphIcon | glyphicon-trash | Icon for the form delete button |
| deleteButtonGlyphIcon | glyphicon-trash | Icon for the form delete button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonText | - | Text on the form new button. Typically none. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonTooltip | new | Tooltip on the form new button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for new button on top of the form |
| newButtonClass | btn btn-default navbar-btn | Bootstrap CSS class for new button on top of the form. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonGlyphIcon | glyphicon-plus | Icon for the form new button. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| showIdInFormTitle | 0 (off), 1 (on) | Append at the form title the current record id. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
| newButtonGlyphIcon | glyphicon-plus | Icon for the form new button |
| cssClassColumnId | text-muted | A column in a subrecord with the name id|ID|Id gets this class. |
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
.. _config-qfq-ini:
.. _config-qfq-php:
config.qfq.ini
config.qfq.php
--------------
+-------------------------------+-------------------------------------------------------+----------------------------------------------------------------------------+
......@@ -456,58 +460,59 @@ config.qfq.ini
Example: *typo3conf/config.qfq.ini*
Example: *typo3conf/config.qfq.php*: ::
::
; QFQ configuration
;
; Save this file as: <site path>/typo3conf/config.qfq.ini
<?php
DB_1_USER = <DBUSER>
DB_1_SERVER = <DBSERVER>
DB_1_PASSWORD = <DBPW>
DB_1_NAME = <DB>
// QFQ configuration
//
// Save this file as: <site path>/typo3conf/config.qfq.php
; DB_2_USER = <DBUSER>
; DB_2_SERVER = <DBSERVER>
; DB_2_PASSWORD = <DBPW>
; DB_2_NAME = <DB>
return [
'DB_1_USER' => '<DBUSER>',
'DB_1_SERVER' => '<DBSERVER>',
'DB_1_PASSWORD' => '<DBPW>',
'DB_1_NAME' => '<DB>',
; Access via {{TECHNICAL_CONTACT:Y}}
; TECHNICAL_CONTACT = john@doe.com
//DB_2_USER = <DBUSER>
//DB_2_SERVER = <DBSERVER>
//DB_2_PASSWORD = <DBPW>
//DB_2_NAME = <DB>
; LDAP_1_RDN =
; LDAP_1_PASSWORD =
// DB_n ...
// ...
// LDAP_1_RDN =
// LDAP_1_PASSWORD =
];
After parsing the configuration, the following variables will be set automatically in STORE_SYSTEM:
+----------------+--------------------------------------------------------------------------+
| _dbNameData | Can be used to dynamically access the current selected database |
+----------------+--------------------------------------------------------------------------+
| _dbNameQfq | Can be used to dynamically access the current selected database |
+----------------+--------------------------------------------------------------------------+
+----------------+-----------------------------------------------------------------------------------+
| _dbNameData | Can be used to dynamically access the current selected database: {{dbNameData:Y}} |
+----------------+-----------------------------------------------------------------------------------+
| _dbNameQfq | Can be used to dynamically access the current selected database: {{dbNameQfq:Y}} |
+----------------+-----------------------------------------------------------------------------------+
.. _`CustomVariables`:
Custom variables
^^^^^^^^^^^^^^^^
It's also possible to setup custom variables in `config.qfq.ini`.
Up to 30 custom variables can be defined in `configuration`_.
E.g. to setup a contact address and reuse the information inside your installation do:
E.g. to setup a contact address and reuse the information inside your installation do: ::
* `config.qfq.in`::
ADMINISTRATIVE_CONTACT = john@doe.com
ADMINISTRATIVE_ADDRESS = John Doe, Hollywood Blvd. 1, L.A.
ADMINISTRATIVE_NAME = John Doe
custom1: ADMINISTRATIVE_CONTACT = john@doe.com
custom2: ADMINISTRATIVE_ADDRESS = John Doe, Hollywood Blvd. 1, L.A.
custom3: ADMINISTRATIVE_NAME = John Doe
* Somewhere in a `Form` or in `Report`::
{{ADMINISTRATIVE_CONTACT:Y}}, {{ADMINISTRATIVE_ADDRESS:Y}}, {{ADMINISTRATIVE_NAME}}
It's also possible to configure such variables directly in `config.qfq.php`_.
.. _`fillStoreSystemBySql`:
Fill STORE_SYSTEM by SQL
......@@ -541,7 +546,7 @@ After a full QFQ installation:
* a table `Period` (extend / change it to your needs, fill them with your periods),
* one sample record in table `Period`,
Websites, delivering semester data, schoolyears schedules, or any other type or periods, often need an index to the
Websites, delivering semester data, school year schedules, or any other type or periods, often need an index to the
*current* period.
In configuration_: ::
......@@ -776,7 +781,7 @@ in `indexQfq`. If specific forms or reports should use a different database than
A `Form` will:
* load the own definition from `indexQfq` (table `Form` and `FormElement`),
* loads and save data from/in `indexData` (config.qfq.in) / `dbIndex` (form.parameter.dbIndex),
* loads and save data from/in `indexData` (config.qfq.php) / `dbIndex` (form.parameter.dbIndex),
* retrieve extra information via `dbIndexExtra` - this is useful to offer information from a database and save them in a
different one.
......@@ -815,7 +820,7 @@ Note:
| C | appC3.edu | 'wAppC3' | <dbHostAppC3>, <dbnameC3>_t3 | <dbHostC3>, <dbnameSysC3>_db | <dbHostData>_db, <dbNameData>_db |
+---+----------------+--------------+-------------------------------+------------------------------+----------------------------------+
In config-qfq-ini_ mutliple database credentials can be prepared. Mandatory is at least one credential setup like
In config-qfq-php_ mutliple database credentials can be prepared. Mandatory is at least one credential setup like
`DB_1_USER`, `DB_1_SERVER`, `DB_1_PASSWORD`, `DB_1_NAME`. The number '1' indicates the `dbIndex`. Increment the number
to specify further database credential setups.
......@@ -1593,7 +1598,7 @@ To decide which Parameter should be placed on *Form.parameter* and which on *For
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| ldapTimeLimit | 3 (default) | Maximum time to wait for an answer of the LDAP Server | x | x | TA, FSL |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| ldapUseBindCredentials | ldapUseBindCredentials=1 | Use LDAP_1_* crendentials from config-qfq-ini_ for ldap_bind()| x | x | TA, FSL |
| ldapUseBindCredentials | ldapUseBindCredentials=1 | Use LDAP_1_* crendentials from config-qfq-php_ for ldap_bind()| x | x | TA, FSL |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
| typeAheadLdap | - | Enable LDAP as 'Typeahead' data source | | x | TA |
+-----------------------------+----------------------------------+---------------------------------------------------------------+------+-------------+----------+
......@@ -1619,7 +1624,7 @@ To decide which Parameter should be placed on *Form.parameter* and which on *For
* *typeAheadLimit*: there might be a hard limit on the server side (e.g. 100) - which can't be extended.
* *ldapUseBindCredentials* is only necessary if `anonymous` access is not possible. RDN and password has to be configured in
config-qfq-ini_.
config-qfq-php_.
.. _LDAP_Typeahead:
......@@ -1888,7 +1893,7 @@ Definition
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Show button | 'new, delete, close, save' (Default: 'new,delete,close,save'): Shown named buttons in the upper right corner of the form. See `form-showButton`_ |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Forward Mode | 'client | no | url | url-skip-history' (Default: client): See `form-forward`_. |
|Forward Mode | 'auto | close | no | url | url-skip-history' (Default: auto): See `form-forward`_. |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Forward (Mode) Page | a) URL / Typo3 page id/alias or b) Forward Mode (via '{{...}}') or combination of a) & b). See `form-forward`_. |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
......@@ -2003,14 +2008,15 @@ Forward (=forwardMode)
After the user presses *Save*, *Close*, *Delete* or *New*, different actions are possible where the browser redirects to.
* `client` (default) - the QFQ browser Javascript logic, decides to stay on the page or to force a redirection
to a previous page.
* `auto` (default) - the QFQ browser Javascript logic, decides to stay on the page or to force a redirection
to a previous page. The decision depends on:
* *Close* closes the current page and goes back to the previous page. Note: if a new tab is opened and the user presses
QFQ close (in any way) - in that new browser tab there is no previous page! QFQ won't close the tab, instead a message
is shown
* *Close* goes back (feels like close) to the previous page. Note: if there is no history, QFQ won't close the tab,
instead a message is shown.
* *Save* stays on the current page.
* `close` - goes back (feels like close) to the previous page. Note: if there is no history, QFQ won't close the tab,
instead a message is shown.
* `no` - no change, the browser remains on the current side. Close does not close the page. It just triggers a save if
there are modified data.
* `url` - the browser redirects to the URL or T3 page named in `Forward URL / Page`. Independent if the user presses `save` or `close`.
......@@ -2031,14 +2037,14 @@ Format: [<url>] or [<mode>|<url>]
* `{{SELECT ...}}`
* `<mode>|<url>`
* `<mode>` - Valid keywords are as above: `no|client|url|url-skip-history`
* `<mode>` - Valid keywords are as above: `auto|close|no|url|url-skip-history`
Specifying the mode in `forwardPage` overwrites `formMode` (but only if `formMode` is `url...`).
Also regular QFQ statements like {{var}} or {{SELECT ...}} are possible in `forwardPage`. This is useful to dynamically
redirect to different targets, depending on user input or any other dependencies.
If a forwardMode 'url...' is specified and there is no `forwardPage`, QFQ falls down to `client` mode.
If a forwardMode 'url...' is specified and there is no `forwardPage`, QFQ falls down to `auto` mode.
On a form, the user might click 'save' or 'save,close' or 'close' (with modified data this leads to 'save,close').
The CLIENT `submit_reason` shows the user action:
......@@ -2048,7 +2054,7 @@ The CLIENT `submit_reason` shows the user action:
Example forwardPage
^^^^^^^^^^^^^^^^^^^
* `{{SELECT IF('{{formModeGlobal:S:alnumx}}'='requiredOff', 'no', 'client') }}`
* `{{SELECT IF('{{formModeGlobal:S:alnumx}}'='requiredOff', 'no', 'auto') }}`
* `{{SELECT IF('{{submit_reason:CE:alnumx}}'='save', 'no', 'url'), '|http://example.com' }}`
Type: combined dynamic mode & URL/page
......@@ -2069,7 +2075,7 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| Name | Type | Description |
+=============================+========+==========================================================================================================+
| dbIndex | int | Database credential index, given via `config-qfq-ini`_ to let the current `Form` operate on the database.|
| dbIndex | int | Database credential index, given via `config-qfq-php`_ to let the current `Form` operate on the database.|
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| bsColumns | int | Wrap the whole form in '<div class="col-md-??"> |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
......@@ -2163,6 +2169,8 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| fillStoreVar | string | Fill the STORE_VAR with custom values. See `STORE_VARS`_. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| showIdInFormTitle | string | Overwrite default from configuration_ |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
* Example:
......@@ -2556,7 +2564,7 @@ See also at specific *FormElement* definitions.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| htmlAfter | string | HTML Code wrapped after the complete *FormElement* |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| wrapRow | string | If specified, skip default wrapping (`<div class='col-md-?>`). Instead the given string is used. |
| wrapRow | string | If specified, skip default wrapping (`<div class='col-md-?'>`). Instead the given string is used. |
+------------------------+--------+ |
| wrapLabel | string | |
+------------------------+--------+ |
......@@ -2937,6 +2945,8 @@ Type: text
the value is an empty string
* *inputType* = number (optional). Typically the HTML tag 'type' will be 'text', 'textarea' or 'number' (detected automatically).
If necessary, the HTML tag 'type' might be forced to a specific given value.
* *step* = Step size of the up/down buttons which increase/decrease the number of in the input field. Optional.
Default 1. Only useful with `inputType=number` (defined explicit via `inputType` or detected automatically).
.. _`input-typeahead`:
......@@ -4119,6 +4129,21 @@ Best practice
Custom default value only for 'new records'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Method 1
''''''''
On `Form.parameter` define a `fillStoreVar` query with a column name equal to a form field. That's all.
Example: ::
FormElement.name = technicalContact
Form.parameter.fillStoreVar = {{!SELECT CONCAT(p.firstName, ' ', p.name) AS technicalContact FROM Person AS p WHERE p.account='{{feUser:T}}' }}
What we use here is the default STORE prio FSRVD. If the form loads with r=0, 'F', 'S' and 'R' are empty. 'V' is filled.
If r>0, than 'F' and 'S' are empty and 'R' is filled.
Method 2
''''''''
In the specific `FormElement` set `value={{columnName:RSE}}`. The link to the form should be rendered with
'"...&columnName=<data>&..." AS _page'. The trick is that the STORE_RECORD is empty for new records, and therefore the
corresponding value from STORE_SIP will be returned. Existing records will use the already saved value.
......@@ -6218,8 +6243,139 @@ E.g.::
10.sql = SELECT "p:home&r=0|t:Home|c:qfq-100 qfq-left" AS _pagev
Examples