Commit 937e9832 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Merge remote-tracking branch 'remotes/origin/crose_work' into raos_work

parents 3203edc3 09d0a236
......@@ -37,3 +37,31 @@ call to `api/load.php` upon change.
### id="close-button"
### id="delete-button"
### id="form-new-button"
## Typeahead
Typeahead capable text input elements will be defined by the following attributes:
### .class='qfq-typeahead'
### .data-typeahead-sip
The SIP will store:
Use with SQL: `typeAheadSql`
Use with LDAP:
* `typeAheadLdapServer`
* `typeAheadLdapBaseDn`
* `typeAheadLdapSearch`
* `typeAheadLdapValuePrintf`
* `typeAheadLdapKeyPrintf`
### .data-typeahead-limit
* Defines the limit of entries shown on the client. Default on client is 5. The server will always send a value. The server default is 20.
### .data-typeahead-minlength
* Defines the string minlegth, typed by the user, before the first lookup is started. Default is 2.
......@@ -2,31 +2,33 @@
Neue Versionsnummer
===================
1) In folgenden Files anpassen:
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.
2) In folgenden Files anpassen:
* extension/Documentation/_make/conf.py: release, version
* extension/Documentation/Settings.yml: version
* extension/ext_emconf.php: version
* extension/RELEASE.txt
2) Im Projektverzeichnis:
3) Im Projektverzeichnis:
make t3sphinx (dadurch fallen Fehler in RESTdoc Syntax auf)
3) Merge auf master Branch
4) Neues ZIP bauen: make qfq.zip
5) Merge auf master Branch
git checkout master
git merge crose_work
4) Neuen Tag vergeben: git tag 0.12.0
6) Neuen Tag vergeben: git tag 0.14.0
5) Alle Files, inkl. Tags, in GIT einchecken.
7) Alle Files, inkl. Tags, in GIT einchecken.
6) Per PhpStorm Sync aller Files auf VM qfq
8) Per PhpStorm Sync aller Files auf VM qfq
7) In T3 Instanz Dokumentation rendern lassen.
9) In T3 Instanz Dokumentation rendern lassen.
T3 6.2: Admin Tools > Extension Manager > QFQ > Doku HTML: rechts oben 'Render Documentation'
......@@ -207,6 +207,20 @@ The format of redirect information is outlined below
: Used to provide an URL when `"redirect"` is set to `"url"`. It
should be disregarded unless `"redirect"` is set to `"url"`.
### Typeahead dict Response
{
...
[
{
"key": "<key value>",
"value": <display value>
},
...
],
...
}
## API Endpoints
......@@ -321,6 +335,22 @@ Server Response
: The response contains a [Minimal Response].
[Redirection Response] may be included.
### Typeahead
The Client initiates Typeahead actions via a GET request. A JSON key/value dict will we be send back as response.
The Client GET request contains a 'sip' and the already typed value as 'query' paramter.
Request URL
: api/typeahead.php
Request Method
: GET
URL Parameters
: `sip`, `query`
Server Response
: The response contains at least a [Minimal Response]. In addition, a [Typeahead dict],
## Glossary
......
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _admin-manual:
Administrator Manual
====================
Preparation
-----------
Report & Form
^^^^^^^^^^^^^
The QFQ extension needs in PHP 5.x the PHP MySQL native driver. The following functions are used and are only available with the
native driver (see also: http://dev.mysql.com/downloads/connector/php-mysqlnd/):
* mysqli::get_result (important),
* mysqli::fetch_all (nice to use)
To normalize UTF8 input, the *php5-intl* resp. *php7.0-intl* package is needed by
* normalizer::normalize()
Preparation for Ubuntu 14.04::
sudo apt-get install php5-mysqlnd php5-intl
sudo php5enmod mysqlnd
sudo service apache2 restart
Preparation steps for Ubuntu 16.04::
sudo apt install php7.0-intl
Print page via wkhtmltopdf
^^^^^^^^^^^^^^^^^^^^^^^^^^
Different browser prints the same page in different variations. To prevent this, QFQ implements a small PHP wrapper `print.php`
which uses http://wkhtmltopdf.org/ (webkit based) to convert HTML to PDF. The converter is not included in QFQ and has
to be manually installed.
Hint: The Ubuntu package `wkhtmltopdf` needs a running Xserver - this does not work on a headless webserver. Best is to
install the QT version from the named website above.
In config.qfq.ini specify the:
* installed `wkhtmltopdf` binary,
* the site base URL.
Provide a `print this page`-link (replace {current pageId})::
<a href="typo3conf/ext/qfq/qfq/api/print.php?id={current pageId}">Print this page</a>
Any parameter specified after `print.php` will be delivered to `wkhtmltopdf` as part of the URL.
Typoscript code to implement a print link on every page::
10 = TEXT
10 {
wrap = <a href="typo3conf/ext/qfq/qfq/api/print.php?id=|&type=2"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Printview</a>
data = page:uid
}
Setup
-----
* Install the extension via the Extensionmanager.
* If you install the extension by manual download/upload and get an error message
"can't activate extension": rename the downloaded zip file to `qfq.zip` or `qfq_<version>.zip` (e.g. version: 0.9.1).
* If the Extensionmanager stops after importing: check your memory limit in php.ini.
* Enable the online Documentation_.
* Copy/rename the file *<Documentroot>/typo3conf/ext/<ext_dir>/config.example.qfq.ini* to
*<Documentroot>/typo3conf/config.qfq.ini* and configure the necessary values: `config.qfq.ini`_
The configuration file is outside the extension directory to not loose it during updates.
* Play the SQL File *<ext_dir>/qfq/sql/formEditor.sql* to fill the database with the *FormEditor* records.
* Configure Typoscript to include Bootstrap, jQuery, QFQ javascript and CSS files.
::
page.meta {
X-UA-Compatible = IE=edge
X-UA-Compatible.attribute = http-equiv
viewport=width=device-width, initial-scale=1
}
page.includeCSS {
file1 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap.min.css
file2 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap-theme.min.css
file3 = typo3conf/ext/qfq/Resources/Public/Css/jqx.base.css
file4 = typo3conf/ext/qfq/Resources/Public/Css/jqx.bootstrap.css
file5 = typo3conf/ext/qfq/Resources/Public/Css/qfq-bs.css
}
page.includeJS {
file1 = typo3conf/ext/qfq/Resources/Public/JavaScript/jquery.min.js
file2 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap.min.js
file3 = typo3conf/ext/qfq/Resources/Public/JavaScript/validator.min.js
file4 = typo3conf/ext/qfq/Resources/Public/JavaScript/jqx-all.js
file5 = typo3conf/ext/qfq/Resources/Public/JavaScript/globalize.js
file6 = typo3conf/ext/qfq/Resources/Public/JavaScript/tinymce.min.js
file7 = typo3conf/ext/qfq/Resources/Public/JavaScript/EventEmitter.min.js
file8 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.min.js
}
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:
::
# If there is a form given by SIP: show
form={{form:S}}
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">
tail = </table>
rbeg = <thead><tr>
rend = </tr></thead>
fbeg = <th>
fend = </th>
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
rbeg = <tr>
rend = </tr>
fbeg = <td>
fend = </td>
}
}
.. _config-qfq-ini:
config.qfq.ini
--------------
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| Keyword | Example | Description |
+=============================+=========================================+============================================================================+
| DB_USER | DB_USER=qfqUser | Credentials configured in MySQL |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_PASSWORD | DB_PASSWORD=12345678 | Credentials configured in MySQL |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_SERVER | DB_SERVER=localhost | Hostname of MySQL Server |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_NAME | DB_NAME=qfq_db | Database name |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_NAME_TEST | DB_NAME_TEST=qfq_db_test | Used during development of QFQ |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DB_INIT | DB_INIT=set names utf8 | Global init for using the database. |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| SQL_LOG | SQL_LOG=sql.log | Filename to log SQL commands: relative to <ext_dir> or absolute. |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| SQL_LOG_MODE | SQL_LOG_MODE=modify | *all*: every statement will be logged - this is a lot |
| | | *modify*: log only statements who change data |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| SHOW_DEBUG_INFO | SHOW_DEBUG_INFO=auto | Possible values: auto|yes|no. For 'auto': If a BE User is logged in, |
| | | debug information will be shown on the fronend. |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_INTERNA L | CSS_LINK_CLASS_INTERNAL=internal | CSS class name of links which points to internal tagets |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_LINK_CLASS_EXTERNAL | CSS_LINK_CLASS_EXTERNAL=external | CSS class name of links which points to internal tagets |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_CONTAINER |CSS_CLASS_QFQ_CONTAINER=container | QFQ with own Bootstrap: 'container'. |
| | | QFQ already nested in Bootstrap of mainpage: <empty> |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_FORM_PILL |CSS_CLASS_QFQ_FORM_PILL=qfq-color-grey-1 | Wrap around title bar for pills: CSS Class, typically a background color |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| CSS_CLASS_QFQ_FORM_BODY |CSS_CLASS_QFQ_FORM_BODY=qfq-color-grey-2 | Wrap around formelements: CSS Class, typically a background color |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| DATE_FORMAT | DATE_FORMAT= yyyy-mm-dd | Possible options: yyyy-mm-dd, dd.mm.yyyy |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_PATTERN_ERROR |FORM_DATA_PATTERN_ERROR=please check pa. | Customizable error message used in validator.js. 'pattern' violation |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_REQUIRED_ERROR |FORM_DATA_REQUIRED_ERROR=missing value | Customizable error message used in validator.js. 'required' fields |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_MATCH_ERROR |FORM_DATA_MATCH_ERROR=type error | Customizable error message used in validator.js. 'match' retype mismatch |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| FORM_DATA_ERROR |FORM_DATA_ERROR=generic error | Customizable error message used in validator.js. 'no specific' given |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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 |
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
Example: *typo3conf/config.qfq.ini*
::
; To get internal default values, inactivate the option by commenting (= ';') it.
DB_USER = qfqUser
DB_SERVER = localhost
DB_PASSWORD = 12345678
DB_NAME = qfq_db
DB_INIT = set names utf8
SQL_LOG = sql.log
SHOW_DEBUG_INFO = auto
CSS_LINK_CLASS_INTERNAL = internal
CSS_LINK_CLASS_EXT = external
;CSS_CLASS_QFQ_CONTAINER =
;CSS_CLASS_QFQ_FORM =
CSS_CLASS_QFQ_FORM_PILL = qfq-color-grey-1
CSS_CLASS_QFQ_FORM_BODY = qfq-color-grey-2
;FORM_DATA_PATTERN_ERROR =
;FORM_DATA_REQUIRED_ERROR =
;FORM_DATA_MATCH_ERROR =
;FORM_DATA_ERROR =
;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
Documentation
-------------
To render the QFQ reST documentation:
* Take care to have 'unzip' and 'Python setuptools' installed (necessary to run).
Preparation for Ubuntu 16.04::
sudo apt install unzip python-setuptools python-pip
* Install the extension "Sphinx Python Documentation Generator and Viewer" (sphinx).
* Execute the update script (symbol 'two arrows as a circle' behind the extension name)
* Choose 'Sphinx 1.4.4' - click on 'Import'.
* In the Exension Manager open the configuration dialog of the extension 'sphinx'. Activate the 'Sphinx 1.4.4' option and save it.
* On top of the browser window click on the 'question mark' to open the menu, choose 'Sphinx'.
* Show doumentation 'QFQ Extension'
* If you have problems with the rendering, please check: http://mbless.de/blog/2015/01/26/sphinx-doc-installation-steps.html
......@@ -15,7 +15,7 @@ QFQ Extension
.. only:: html
:Classification:
qfq
qfq
:Version:
|release|
......@@ -25,8 +25,9 @@ QFQ Extension
:Description:
The extension offers support to:
a) create HTML Forms by clicking them together,
b) create reports based an SQL queries. The SQL can be nested and offers support for any kind of tags.
* Create HTML Forms by clicking them together,
* Create reports based an SQL queries. The SQL can be nested and offers support for any kind of tags.
:Keywords:
Quick Form Query, Form, Report, SQL, Query, Generator.
......@@ -35,10 +36,10 @@ QFQ Extension
2017
:Author:
Carsten Rose, Rafael Ostertag
Carsten Rose, Rafael Ostertag
:Email:
carsten.rose@math.uzh.ch, rafael.ostertag@math.uzh.ch
carsten.rose@math.uzh.ch, rafael.ostertag@math.uzh.ch
:License:
This document is published under the Open Publication License
......@@ -56,7 +57,5 @@ QFQ Extension
.. toctree::
:maxdepth: 4
Introduction/Index
AdministratorManual/Index
UsersManual/Index
Manual
Links
......@@ -6,8 +6,8 @@
conf.py:
copyright: 2017
project: QFQ Extension
version: 0.12.0
release: 0.12.0
version: 0.13.0
release: 0.13.0
latex_documents:
- - Index
- qfq.tex
......
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _users-manual:
Users manual
============
Documentation of how to use the extension, how it works, how to apply it, if it's a website plugin.
Language should be non-technical, explaining, using small examples. Don't use to many acronyms unless they have been explained.
Examples: For the "News" plugin this would be a manual showing how to create the news items, explaining the options etc.
Provide screenshots of a neutral Backend such as the Backend of the Introduction Package for instance. Have in mind that the User manual could possibly be re-used in a larger documentation compilation, for example when a company generates a documentation for its client.
Target group: **Users**
.. figure:: ../Images/UserManual/BackendView.png
:width: 500px
:alt: Backend view
Default Backend view (caption of the image)
The Backend view of TYPO3 after the user has clicked on module "Page". (legend of the image)
Link to official documentation
------------------------------
Sphinx makes it easy to link to official TYPO3 documentation:
- :ref:`TYPO3 Tutorial for Editors <t3editors:start>`
- :ref:`Getting Started Tutorial <t3start:start>`
and you may even link to a very specific chapter explaining how to :ref:`create a browser condition <t3tsref:condition-browser>` within the TypoScript Reference.
For a complete reference of available cross-link prefixes, please consult file ``_make/conf.py``.
FAQ
^^^
Possible subsection: FAQ
......@@ -57,9 +57,9 @@ copyright = u'2017, Carsten Rose'
# built documents.
#
# The short X.Y version.
version = '0.12'
version = '0.13'
# The full version, including alpha/beta/rc tags.
release = '0.12.0'
release = '0.13.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
Release
=======
Version 0.13
============
------------
Changes
-------
^^^^^^^
* Table 'FormElement'
* Play formEditor.sql.
* formEditor.sql:
* Checktype of `Form.name` restricted to `alnumx` (prior `all`).
* Changed `access` for Form `form` & '`ormElement` from `always` to `sip`.
* Table `FormElement`
* Modified column: 'checkType' - new value 'numerical'
* Modified column: `checkType` - new value `numerical`
ALTER TABLE FormElement MODIFY COLUMN checkType ENUM('alnumx','digit','numerical','email','min|max','min|max date',
'pattern','allbut','all') NOT NULL DEFAULT 'alnumx'
* Example Report for `forms` extended by a delete button per row.
Features
--------
^^^^^^^^
* print.php
* print.php: offers 'print page' for any local page - create a PDF on the fly (printout is then browser independent).
* Install `wkhtmltopdf` on the webserver (http://wkhtmltopdf.org/).
* In config.qfq.ini setup BASE_URL_PRINT, WKHTMLTOPDF.
* In config.qfq.ini setup:
BASE_URL_PRINT=http://www.../
WKHTMLTOPDF=/opt/wkhtmltox/bin/wkhtmltopdf
* Check and error report if 'php_intl' is missing.
* New Checktype 'allow numerical'.
* Documentation: example for 'radio' with no pre selection.
* #3063, Radios and checkboxes optional rendered in Bootstrap layout.
* Added 'help-box with-errors'-DIV after radios and checkboxes.
* Respect attribute `data-class-on-change` on save buttons.
Bug Fixes
---------
^^^^^^^^^
* #2138 / digit sanitize: new class 'numerical' implemented.
* Fixed recursive thrown exception.
* #2064 / search of a default value for a non existing tablecolumn returns 'false'.
* Fixed setting of STORE_SYSTEM / showDebugInfo during API call.
* #2081, #3180 Form: Label & note - update via `DynamicUpdate`
* #3253, if there is no STORE_TYPO3 (calls through .../api/ like save, delete, load): use SIP / CLIENT_TYPO3VARS.
* qfq-bs.css:
* Alignment of checkboxes and radios optimized.
* CSS class 'qfq-note' for 'notes' (third column in a form).
Version 0.12
============
------------
Changes
-------
^^^^^^^
* Table 'FormElement'
* New column: rowLabelInputNote
......@@ -58,23 +89,26 @@ Changes
* UPDATE EXISTING TypoScript TEMPLATES of QFQ Installation.
* Variable field parameter has changed. old '_filename', new 'filename'
* UPDATE `FormElement` SET parameter = REPLACE(parameter, '_filename', 'filename')
Features
--------
^^^^^^^^
* User input will be UTF8 normalized
* config.qfq-ini:
* config.qfq-ini:
* New configuration values: FORM_BS_LABEL_COLUMNS / FORM_BS_INPUT_COLUMNS / FORM_BS_NOTE_COLUMNS
* Comment empty variables - the new default setting is, that empty parameter in config.qfq.ini means EMPTY (=parameter is set and will not be overwritten by internal default), not UNDEFINED (overwritten by internal default).
* FileUpload:
* FileUpload:
* Implemented new Formelement.parameter: fileReplace=always - will replace existing files.
* Multiple / Advanced Upload: new logic implements slaveId, sqlInsert, sqlUpdate, sqlDelete.
* FormElement.parameter: sqlBefore / sqlAfter fired during 'Form' save for action elements.
* STORE FORM: variable 'filename' moved to STORE VAR - sanatize class needs no longer specified.
* STORE VAR: two new variables 'filename' and 'fileDestination' valid during processing of current upload FormElement.
* Default store priority list changed. Old: 'FSRD', New: 'FSRVD'.
* Default store priority list changed. Old: 'FSRD', New: 'FSRVD'.
* CODING.md: update doc for FormElement 'upload' and general 'Form' rendering & save (recursive rendering).
* User manual:
* User manual:
* Described form layout options: description for bsLabelColumn, bsInputColumn, bsNoteColumn
* Update 'file-upload' doc.
* Described 3 examples for upload forms.
......@@ -94,9 +128,9 @@ Features
* Form.parameter & FormElement.parameter: Lines starting with '#' are treated as comments and will not be parsed.
Bug fixes
---------
^^^^^^^^^
* User manual:
* User manual:
* Fixed double include of validator.js in T3 Typoscript template example.
* Fixed wrong store name SYSTEM: S > Y
* Fixed wrong STORE_FORM variable names.
......@@ -105,7 +139,7 @@ Bug fixes
* Use of 'decryptCurlyBraces()' to get better error messages.
* Skip unwanted parameter expansion during save.
* Fixed bug with uninitialized FE_SLAVE_ID
* formEditor.sql:
* formEditor.sql:
* The defintion as 'editor' (not text) for FormElement 'note' has been lost - reinserted.
* Fixed problem while playing SQL query - deleting old FormElements of Formeditor deleted also FormElements of other forms.
* #3066 / help-text with-error - CSS class 'hidden' will be rendered by default (as long there is no error).
......@@ -113,10 +147,11 @@ Bug fixes
* Respect attribute `data-class-on-change` on save buttons.
Version 0.11
============
------------
Features
--------
^^^^^^^^
* Added STORE_BEFORE, #3146 - Mainly used to compare old and new values during a form 'save' action.
* Added 'best practice' for defining and using of 'Central configure values' in UserManual.
* Added accent characters to sanatize class 'alnumx', #3183.
......@@ -128,30 +163,32 @@ Features