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

Fix #3420 / Quicklink 'editform' on form: directs to the current T3 page which...

Fix #3420 / Quicklink 'editform' on form: directs to the current T3 page which might be insufficient
AbstractBuildForm.php, Store.php: Introduce new config.qfq.ini setting 'EDIT_FORM_PAGE'
parent 11513631
......@@ -126,7 +126,9 @@ Setup
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` and insert a content record of
type *qfq*. In the bodytext insert the following code:
::
......@@ -217,7 +219,8 @@ config.qfq.ini
+-----------------------------+-----------------------------------------+----------------------------------------------------------------------------+
| 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*
......@@ -248,6 +251,7 @@ Example: *typo3conf/config.qfq.ini*
;FORM_BS_NOTE_COLUMNS = 3
BASE_URL_PRINT=http://example.com
WKHTMLTOPDF=/usr/bin/wkhtmltopdf
;EDIT_FORM_PAGE = form
.. _local-documentation:
......
......@@ -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
......@@ -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']
];
......
......@@ -335,6 +335,8 @@ const SYSTEM_FORM_BUTTON_ON_CHANGE_CLASS = 'FORM_BUTTON_ON_CHANGE_CLASS';
const SYSTEM_BASE_URL_PRINT = 'BASE_URL_PRINT';
const SYSTEM_WKHTMLTOPDF = 'WKHTMLTOPDF';
const SYSTEM_EDIT_FORM_PAGE = 'EDIT_FORM_PAGE';
// computed automatically during runtime
const SYSTEM_PATH_EXT = 'EXT_PATH';
const SYSTEM_SITE_PATH = 'SITE_PATH';
......
......@@ -197,7 +197,7 @@ class Store {
Support::setIfNotSet($config, F_CLASS_PILL, 'qfq-color-grey-1');
Support::setIfNotSet($config, F_CLASS_BODY, 'qfq-color-grey-2');
Support::setIfNotSet($config, F_BUTTON_ON_CHANGE_CLASS, 'btn-info alert-info');
Support::setIfNotSet($config, SYSTEM_EDIT_FORM_PAGE, 'form');
$config = self::doSystemPath($config);
$config = self::adjustConfig($config);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment