diff --git a/extension/Documentation/Manual.rst b/extension/Documentation/Manual.rst index 5efb0303ae7b7041fb68c8ffcf01956b8a35ef84..0bd643174f8eb1b3bf3146075c7824d2784e9c4b 100644 --- a/extension/Documentation/Manual.rst +++ b/extension/Documentation/Manual.rst @@ -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: diff --git a/extension/config.qfq.example.ini b/extension/config.qfq.example.ini index 9d1e9415a877cdb459b874b77f66914651cf49ea..66eaa11a8a4f0854e3dc258451c9d36dda6adcd6 100644 --- a/extension/config.qfq.example.ini +++ b/extension/config.qfq.example.ini @@ -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 diff --git a/extension/qfq/qfq/AbstractBuildForm.php b/extension/qfq/qfq/AbstractBuildForm.php index 2b82b9d7900c8438f2989dbfb354eb5e51f8b9a0..ae437fc72056196fb010c6dba6a3f9a5edff6dda 100644 --- a/extension/qfq/qfq/AbstractBuildForm.php +++ b/extension/qfq/qfq/AbstractBuildForm.php @@ -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'] ]; diff --git a/extension/qfq/qfq/Constants.php b/extension/qfq/qfq/Constants.php index 35c58047a022b626c82a3158b792fa4b79d4dd8f..c3f67c606df51d6449659cd2b077b92416526d84 100644 --- a/extension/qfq/qfq/Constants.php +++ b/extension/qfq/qfq/Constants.php @@ -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'; diff --git a/extension/qfq/qfq/store/Store.php b/extension/qfq/qfq/store/Store.php index 22c055792ba39530990d3ea4a4aaaf3af15937ee..2aa67e64829af722f7cbb92b6a2ba4e231dbc206 100644 --- a/extension/qfq/qfq/store/Store.php +++ b/extension/qfq/qfq/store/Store.php @@ -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);