Commit a84fc240 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#3790 / Multilanguage: German/ English/ ...

Manual.rst: how to use the multi language forms.
DatabaseUpdateData.php: Update DB with new language fields.
HelperFormElement.php: modify explodeParameter() to not check already existing definitions.
QuickFormQuery.php: new setLanguage().
parent a11212df
......@@ -145,7 +145,7 @@ Setup
*<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.
* When the QFQ Extension is called the first time on the Typo3 Frontend, the file *<ext_dir>/qfq/sql/formEditor.sql* will
played and fills the database with the *FormEditor* records. This also happens automatically after each software update of QFQ.
played and fills the database with the *Form editor* records. This also happens automatically after each software update of QFQ.
* Configure Typoscript to include Bootstrap, jQuery, QFQ javascript and CSS files.
::
......@@ -345,7 +345,16 @@ config.qfq.ini
| VAR_ADD_BY_SQL | VAR_ADD_BY_SQL = {{!SELECT s.id AS ... | Specific values read from the database to fill the system store during QFQ |
| | | load. See `VariablesAddBySql`_ for a usecase. |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| FORM_LANGUAGE_A_ID | FORM_LANGUAGE_A__ID = 1 | In Typo3 configured pageLanguage id. The number after the 'L' parameter. |
| FORM_LANGUAGE_B_ID | | |
| FORM_LANGUAGE_C_ID | | |
| FORM_LANGUAGE_D_ID | | |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| FORM_LANGUAGE_A_LABEL | FORM_LANGUAGE_A_LABEL = english | Label shown in *Form editor*, on the 'basic' tab. |
| FORM_LANGUAGE_B_LABEL | | |
| FORM_LANGUAGE_C_LABEL | | |
| FORM_LANGUAGE_D_LABEL | | |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
Example: *typo3conf/config.qfq.ini*
......@@ -425,6 +434,9 @@ Example: *typo3conf/config.qfq.ini*
;VAR_ADD_BY_SQL = {{!SELECT s.id AS _periodId FROM Period AS s WHERE s.start<=NOW() ORDER BY s.start DESC LIMIT 1}}
;FORM_LANGUAGE_A_ID = 1
;FORM_LANGUAGE_A_LABEL = english
.. _`CustomVariables`:
Custom variables
......@@ -456,7 +468,7 @@ Existing variables will be overwritten. Be carefull not to overwrite needed valu
This option is usefull to make generic custom values, saved in the database, accessible to all QFQ Report and Forms.
Access such variables as usual via `{{<varname>:Y}}`.
.. _`periodId :
.. _`periodId`:
periodId
''''''''
......@@ -880,7 +892,7 @@ To protect the web application the following `escape` types are available:
* Be careful when escaping nested variables. Best is to escape **only** the most outer variable.
* In `config.qfq.ini`_ a global `ESCAPE_TYPE_DEFAULT` can be defined. The configured escape type applies to all substituted
variables, who *do not* contain a *specific* escape type.
* Additionally a `defaultEscapeType` can be defined per `Form` (separate field in the Form Editor). This overwrites the
* Additionally a `defaultEscapeType` can be defined per `Form` (separate field in the *Form editor*). This overwrites the
global definition of `config.qfq.ini`. By default, every `Form.defaultEscapeType` = 'c' (=config), which means the setting
in `config.qfq.ini`_.
* To suppress a default escape type, define the `escape type` = '-' on the specific variable. E.g.: `{{name:FE:alnumx:-}}`.
......@@ -1492,8 +1504,8 @@ Form
General
-------
* Forms will be created by using the *QFQ Form Editor* on the Typo3 frontend (HTML form).
* The Formeditor itself consist of two predefined QFQ forms: *form* and *formElement* - these forms are often updated
* Forms will be created by using the *Form Editor* on the Typo3 frontend (HTML form).
* The *Form editor* itself consist of two predefined QFQ forms: *form* and *formElement* - these forms are often updated
during the installation of new QFQ versions.
* Every form consist of a) a *Form* record and b) multiple *FormElement* records.
* A form is assigned to a *table*. Such a table is called the *primary table* for this form.
......@@ -3162,6 +3174,60 @@ See also `copy-form`_.
* *recordDestinationTable* - table where the new records will be copied to.
* *translateIdColumn* - columnname to update references of newly created id's.
.. _multi-language-form:
Multi Language Form
-------------------
QFQ Forms might be configured for up to 5 different languages. Per language there is one extra field in the *Form editor*.
Which field represents which language is configured in `config.qfq.ini`_.
* The Typo3 installation needs to be configured to handle different languages - this is independet of QFQ and not covered
here. QFQ will use the Typo3 internal variable 'pageLanguage', which typically correlates to the URL parameter 'L' in the URL.
* In `config.qfq.ini`_ the Typo3 language index (value of 'L') and a language label have to be configured for each language.
Only than, the additional language fields in the *Form editor* will be shown.
Example
^^^^^^^
Assuming the Typo3 page has the
* default language, L=0
* english, L=1
* spain, L=2
Configuration in `config.qfq.ini`: ::
FORM_LANGUAGE_A_ID = 1
FORM_LANGUAGE_A_LABEL = english
FORM_LANGUAGE_B_ID = 2
FORM_LANGUAGE_B_LABEL = spain
The default language is not covered in config.qfq.ini.
The *Form editor* now shows on the pill 'Basic' (Form und FormEditor) for both languages each an additional parameter
input field. Any input field in the *Form editor* can be redeclared in the correspondig language parameter field. Any
missing definition means 'take the default'. E.g.: ::
Form.title: Eingabe Person
Form.languageParameterA: title=Input Person
Form.languageParameterB: title=Persona de entrada
FormElement 'firstname':
FormElement.title = Vorname
FormElement.note = Bitte alle Vornamen erfassen
Form.languageParameterA: title=Input Person
note=Please all firstnames
Form.languageParameterB: title=Persona de entrada
note=Por favor, introduzca todos los nombres
The following fields are possible:
* Form: title, showButton, forwardMode, forwardPage, bsLabelColumns, bsInputColumns, bsNoteColumns, recordLockTimeoutSeconds
* FormElement: label, mode, mdoeSql, class, type, subrecordOption, encode, checkType, ord, tabindex, size, maxLength,
bsLabelColumns, bsInputColumns, bsNoteColumns,rowLabelInputNote, note, tooltip, placeholder, value, sql1, feGroup
.. _dynamic-update:
Dynamic Update
......
......@@ -95,4 +95,17 @@ WKHTMLTOPDF = /opt/wkhtmltox/bin/wkhtmltopdf
; Local Documentation (doc fits to installed version): typo3conf/ext/qfq/Documentation/html/Manual.html
;DOCUMENTATION_QFQ = https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-053/Manual.html
; VAR_ADD_BY_SQL = SELECT id AS _periodId FROM Period WHERE start<=NOW() ORDER BY start DESC LIMIT 1
\ No newline at end of file
; VAR_ADD_BY_SQL = SELECT id AS _periodId FROM Period WHERE start<=NOW() ORDER BY start DESC LIMIT 1
; FORM_LANGUAGE_A_ID = E.g. FORM_LANGUAGE_A_ID = 1
; FORM_LANGUAGE_A_LABEL = E.g. FORM_LANGUAGE_A_ID = English
; FORM_LANGUAGE_B_ID = E.g. FORM_LANGUAGE_B_ID = 2
; FORM_LANGUAGE_B_LABEL = E.g. FORM_LANGUAGE_B_ID = French
; FORM_LANGUAGE_C_ID = E.g. FORM_LANGUAGE_C_ID = 3
; FORM_LANGUAGE_C_LABEL = E.g. FORM_LANGUAGE_C_ID = Spain
; FORM_LANGUAGE_D_ID = E.g. FORM_LANGUAGE_D_ID = 4
; FORM_LANGUAGE_D_LABEL = E.g. FORM_LANGUAGE_D_ID = Chinese
......@@ -262,6 +262,9 @@ const ERROR_DIRTY_MISSING_LOCK = 2203;
const ERROR_DIRTY_ALREADY_LOCKED = 2204;
const ERROR_DIRTY_RECORD_MODIFIED = 2205;
// Language
const ERROR_LANGUAGE_NOT_CONFIGURED_IN_QFQ = 2300;
//
// Store Names: Identifier
......@@ -439,6 +442,20 @@ const SYSTEM_RECORD_LOCK_TIMEOUT_SECONDS_DEFAULT = 900; // 15 mins
const SYSTEM_VAR_ADD_BY_SQL = 'VAR_ADD_BY_SQL';
const SYSTEM_VAR_ADD_BY_SQL_DEFAULT = 'SELECT id AS periodId FROM Period WHERE start<=NOW() ORDER BY start DESC LIMIT 1';
const SYSTEM_FORM_LANGUAGE = 'FORM_LANGUAGE';
const SYSTEM_FORM_LANGUAGE_A_ID = 'FORM_LANGUAGE_A_ID';
const SYSTEM_FORM_LANGUAGE_A_LABEL = 'FORM_LANGUAGE_A_LABEL';
const SYSTEM_FORM_LANGUAGE_B_ID = 'FORM_LANGUAGE_B_ID';
const SYSTEM_FORM_LANGUAGE_B_LABEL = 'FORM_LANGUAGE_B_LABEL';
const SYSTEM_FORM_LANGUAGE_C_ID = 'FORM_LANGUAGE_C_ID';
const SYSTEM_FORM_LANGUAGE_C_LABEL = 'FORM_LANGUAGE_C_LABEL';
const SYSTEM_FORM_LANGUAGE_D_ID = 'FORM_LANGUAGE_D_ID';
const SYSTEM_FORM_LANGUAGE_D_LABEL = 'FORM_LANGUAGE_D_LABEL';
const DOCUMENTATION_QFQ = 'DOCUMENTATION_QFQ';
const DOCUMENTATION_QFQ_URL = 'https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-053/Manual.html';
......
......@@ -530,6 +530,7 @@ class QuickFormQuery {
$formSpec = $this->eval->parseArray($form);
HelperFormElement::explodeParameter($formSpec, F_PARAMETER);
$formSpec = $this->setLanguage($formSpec);
$formSpec = $this->syncSystemFormConfig($formSpec);
$formSpec = $this->initForm($formSpec);
......@@ -553,16 +554,17 @@ class QuickFormQuery {
// FE: Native & Container
// "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.feIdContainer = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
$feSpecNative = array();
switch ($mode) {
case FORM_LOAD:
// Select all Native elements (native, pill, fieldset, templateGroup) which are NOT nested = Root level.
$this->feSpecNative = $this->db->getNativeFormElements(SQL_FORM_ELEMENT_SPECIFIC_CONTAINER, ['no', $this->formSpec["id"], 'native,container', 0], $this->formSpec);
$feSpecNative = $this->db->getNativeFormElements(SQL_FORM_ELEMENT_SPECIFIC_CONTAINER, ['no', $this->formSpec["id"], 'native,container', 0], $this->formSpec);
break;
case FORM_SAVE:
case FORM_UPDATE:
// $this->feSpecNative = $this->db->getNativeFormElements(SQL_FORM_ELEMENT_ALL_CONTAINER, ['no', $this->formSpec["id"], 'native'], $this->formSpec);
$this->feSpecNative = $this->getNativeFormElements(SQL_FORM_ELEMENT_NATIVE_TG_COUNT, [$this->formSpec["id"]], $this->formSpec);
$feSpecNative = $this->getNativeFormElements(SQL_FORM_ELEMENT_NATIVE_TG_COUNT, [$this->formSpec["id"]], $this->formSpec);
break;
case FORM_DELETE:
......@@ -573,9 +575,40 @@ class QuickFormQuery {
break;
}
$this->feSpecNative = $this->setLanguage($feSpecNative);
return $formName;
}
/**
* @param array $formSpec
* @return array
* @throws UserFormException
*/
private function setLanguage(array $formSpec) {
$typo3PageLanguage = $this->store->getVar(TYPO3_PAGE_LANGUAGE, STORE_TYPO3);
if (empty($typo3PageLanguage)) {
return $formSpec;
}
foreach (['A', 'B', 'C', 'D'] as $key) {
$languageIdx = SYSTEM_FORM_LANGUAGE . "_$key" . "_ID";
if ($this->store->getVar($languageIdx, STORE_SYSTEM) == $typo3PageLanguage) {
$parameterField = 'parameterLanguage' . $key;
break;
}
}
if (!isset($parameterField)) {
throw new UserFormException("Language not configured in QFQ for L=" . $typo3PageLanguage, ERROR_LANGUAGE_NOT_CONFIGURED_IN_QFQ);
}
HelperFormElement::explodeParameter($formSpec, $parameterField, true);
return $formSpec;
}
/**
* Depending on $sql reads FormElements to a specific container or all. Preprocess all FormElements.
* This code is dirty: the nearly same function exists in class 'Database' - the difference is only 'explodeTemplateGroupElements()'.
......
......@@ -61,15 +61,15 @@ $UPDATE_ARRAY = array(
],
'0.19.5' => [
"ALTER TABLE `Form` ADD `parameterL1` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `Form` ADD `parameterL2` TEXT NOT NULL AFTER `parameterL1`",
"ALTER TABLE `Form` ADD `parameterL3` TEXT NOT NULL AFTER `parameterL2`",
"ALTER TABLE `Form` ADD `parameterL4` TEXT NOT NULL AFTER `parameterL3`",
"ALTER TABLE `FormElement` ADD `parameterL1` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `FormElement` ADD `parameterL2` TEXT NOT NULL AFTER `parameterL1`",
"ALTER TABLE `FormElement` ADD `parameterL3` TEXT NOT NULL AFTER `parameterL2`",
"ALTER TABLE `FormElement` ADD `parameterL4` TEXT NOT NULL AFTER `parameterL3`"
"ALTER TABLE `Form` ADD `parameterLanguageA` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `Form` ADD `parameterLanguageB` TEXT NOT NULL AFTER `parameterLanguageA`",
"ALTER TABLE `Form` ADD `parameterLanguageC` TEXT NOT NULL AFTER `parameterLanguageB`",
"ALTER TABLE `Form` ADD `parameterLanguageD` TEXT NOT NULL AFTER `parameterLanguageC`",
"ALTER TABLE `FormElement` ADD `parameterLanguageA` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `FormElement` ADD `parameterLanguageB` TEXT NOT NULL AFTER `parameterLanguageA`",
"ALTER TABLE `FormElement` ADD `parameterLanguageC` TEXT NOT NULL AFTER `parameterLanguageB`",
"ALTER TABLE `FormElement` ADD `parameterLanguageD` TEXT NOT NULL AFTER `parameterLanguageC`"
],
);
......
......@@ -55,19 +55,22 @@ class HelperFormElement {
* @throws CodeException
* @throws \qfq\UserFormException
*/
public static function explodeParameter(array &$element, $keyName) {
public static function explodeParameter(array &$element, $keyName, $flagAllowOverwrite = false) {
// Something to explode?
if (isset($element[$keyName]) && $element[$keyName] !== '') {
// Explode
$arr = KeyValueStringParser::parse($element[$keyName], "=", "\n");
// Check if some of the exploded keys conflict with existing keys
$checkKeys = array_keys($arr);
foreach ($checkKeys AS $checkKey) {
if (isset($element[$checkKey])) {
$store = Store::getInstance();
$store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($element), STORE_SYSTEM);
$store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, $keyName, STORE_SYSTEM);
throw new UserFormException("Found reserved keyname '$checkKey'", ERROR_RESERVED_KEY_NAME);
if (!$flagAllowOverwrite) {
// Check if some of the exploded keys conflict with existing keys
$checkKeys = array_keys($arr);
foreach ($checkKeys AS $checkKey) {
if (isset($element[$checkKey])) {
$store = Store::getInstance();
$store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($element), STORE_SYSTEM);
$store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, $keyName, STORE_SYSTEM);
throw new UserFormException("Found reserved keyname '$checkKey'", ERROR_RESERVED_KEY_NAME);
}
}
}
$element = array_merge($element, $arr);
......@@ -77,9 +80,10 @@ class HelperFormElement {
/**
* Build the FE name: <field>-<record index)
*
* @param string $field
* @param array $formElement
* @param string $id
* @return string
* @internal param string $field
*/
public static function buildFormElementName(array $formElement, $id) {
$field = ($formElement[FE_NAME] == '') ? $formElement[FE_ID] : $formElement[FE_NAME];
......
......@@ -27,9 +27,10 @@ CREATE TABLE IF NOT EXISTS `Form` (
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`parameter` TEXT NOT NULL,
`parameterL1` TEXT NOT NULL,
`parameterL2` TEXT NOT NULL,
`parameterL3` TEXT NOT NULL,
`parameterLanguageA` TEXT NOT NULL,
`parameterLanguageB` TEXT NOT NULL,
`parameterLanguageC` TEXT NOT NULL,
`parameterLanguageD` TEXT NOT NULL,
`recordLockTimeoutSeconds` INT(11) NOT NULL DEFAULT 900,
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
......@@ -61,57 +62,58 @@ CREATE TABLE IF NOT EXISTS `Form` (
#DROP TABLE IF EXISTS `FormElement`;
CREATE TABLE IF NOT EXISTS `FormElement` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`formId` INT(11) NOT NULL,
`feIdContainer` INT(11) NOT NULL DEFAULT '0',
`dynamicUpdate` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'required', 'readonly', 'hidden') NOT NULL DEFAULT 'show',
`modeSql` TEXT NOT NULL,
`class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`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', 'paste') NOT NULL DEFAULT 'text',
`subrecordOption` SET('edit', 'delete', 'new') NOT NULL DEFAULT '',
`encode` ENUM('none', 'specialchar') NOT NULL DEFAULT 'specialchar',
`checkType` ENUM('alnumx', 'digit', 'numerical', 'email', 'min|max', 'min|max date', 'pattern', 'allbut', 'all') NOT NULL DEFAULT 'alnumx',
`checkPattern` VARCHAR(255) NOT NULL DEFAULT '',
`onChange` VARCHAR(255) NOT NULL DEFAULT '',
`ord` INT(11) NOT NULL DEFAULT '0',
`tabindex` INT(11) NOT NULL DEFAULT '0',
`size` VARCHAR(255) NOT NULL DEFAULT '',
`maxLength` VARCHAR(255) NOT NULL DEFAULT '',
`bsLabelColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsInputColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`rowLabelInputNote` SET('row', 'label', '/label', 'input', '/input', 'note', '/note', '/row') NOT NULL DEFAULT 'row,label,/label,input,/input,note,/note,/row',
`note` TEXT NOT NULL,
`adminNote` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(2048) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`parameter` TEXT NOT NULL,
`parameterL1` TEXT NOT NULL,
`parameterL2` TEXT NOT NULL,
`parameterL3` TEXT NOT NULL,
`clientJs` TEXT NOT NULL,
`feGroup` VARCHAR(255) NOT NULL DEFAULT '',
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`id` INT(11) NOT NULL AUTO_INCREMENT,
`formId` INT(11) NOT NULL,
`feIdContainer` INT(11) NOT NULL DEFAULT '0',
`dynamicUpdate` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'required', 'readonly', 'hidden') NOT NULL DEFAULT 'show',
`modeSql` TEXT NOT NULL,
`class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`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', 'paste') NOT NULL DEFAULT 'text',
`subrecordOption` SET('edit', 'delete', 'new') NOT NULL DEFAULT '',
`encode` ENUM('none', 'specialchar') NOT NULL DEFAULT 'specialchar',
`checkType` ENUM('alnumx', 'digit', 'numerical', 'email', 'min|max', 'min|max date', 'pattern', 'allbut', 'all') NOT NULL DEFAULT 'alnumx',
`checkPattern` VARCHAR(255) NOT NULL DEFAULT '',
`onChange` VARCHAR(255) NOT NULL DEFAULT '',
`ord` INT(11) NOT NULL DEFAULT '0',
`tabindex` INT(11) NOT NULL DEFAULT '0',
`size` VARCHAR(255) NOT NULL DEFAULT '',
`maxLength` VARCHAR(255) NOT NULL DEFAULT '',
`bsLabelColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsInputColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`rowLabelInputNote` SET('row', 'label', '/label', 'input', '/input', 'note', '/note', '/row') NOT NULL DEFAULT 'row,label,/label,input,/input,note,/note,/row',
`note` TEXT NOT NULL,
`adminNote` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(2048) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`parameter` TEXT NOT NULL,
`parameterLanguageA` TEXT NOT NULL,
`parameterLanguageB` TEXT NOT NULL,
`parameterLanguageC` TEXT NOT NULL,
`parameterLanguageD` TEXT NOT NULL,
`clientJs` TEXT NOT NULL,
`feGroup` VARCHAR(255) NOT NULL DEFAULT '',
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `formId` (`formId`),
......@@ -210,6 +212,14 @@ VALUES
(1, 'noteInternal', 'Note', 'show', 'text', 'all', 'native', 140, '40,3', 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-note">Info</a>', '', '', '', '', 1, '', '', '', 'specialchar', 'no', ''),
(1, 'tableName', 'Table', 'required', 'select', 'all', 'native', 150, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-tablename">Info</a>', '', '', '{{!SHOW tables}}',
'emptyItemAtStart', 1, '', '', '', 'specialchar', 'no', ''),
(1, 'parameterLanguageA', 'Language: {{FORM_LANGUAGE_A_LABEL:YE}}', 'show', 'text', 'all', 'native', 160, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '{{SELECT IF("{{FORM_LANGUAGE_A_ID:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageB', 'Language: {{FORM_LANGUAGE_B_LABEL:YE}}', 'show', 'text', 'all', 'native', 160, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '{{SELECT IF("{{FORM_LANGUAGE_B_ID:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageC', 'Language: {{FORM_LANGUAGE_C_LABEL:YE}}', 'show', 'text', 'all', 'native', 160, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '{{SELECT IF("{{FORM_LANGUAGE_C_ID:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'parameterLanguageD', 'Language: {{FORM_LANGUAGE_D_LABEL:YE}}', 'show', 'text', 'all', 'native', 160, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 1, '', '{{SELECT IF("{{FORM_LANGUAGE_D_ID:YE}}"="","hidden","show" ) }}', '', 'none', 'no', ''),
(1, 'requiredParameter', 'Required Parameter', 'show', 'text', 'all', 'native', 200, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-requiredParameter">Info</a>', '', '', '', '', 2, '', '', '', 'specialchar', 'no', ''),
(1, 'permitNew', 'Permit New', 'show', 'radio', 'all', 'native', 210, 0, 10, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-permitNewEdit">Info</a>', '', '', '', 'buttonClass=btn-default', 2, '', '', '', 'specialchar', 'no', ''),
(1, 'permitEdit', 'Permit Edit', 'show', 'radio', 'all', 'native', 220, 0, 10, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-permitNewEdit">Info</a>', '', '', '', 'buttonClass=btn-default', 2, '', '', '', 'specialchar', 'no', ''),
......@@ -229,7 +239,8 @@ VALUES
(1, 'bsNoteColumns', 'BS Note Columns', 'show', 'text', 'all', 'native', 350, 0, 0, '', '', '', '', '', 3, '', '', '{{bsNoteColumns:Y}}', 'specialchar', 'no', ''),
(1, 'deleted', 'Deleted', 'show', 'checkbox', 'all', 'native', 360, 0, 0, '', '', '', '', '', 3, '', '', '', 'specialchar', 'no', ''),
(1, 'modified', 'Modified', 'readonly', 'text', 'all', 'native', 370, 0, 20, '', '', '', '', '', 3, '', '', '', 'specialchar', 'no', ''),
(1, 'created', 'Created', 'readonly', 'text', 'all', 'native', 380, 0, 20, '', '', '', '', '', 3, '', '', '', 'specialchar', 'no', ''),
(1, 'created', 'Created', 'readonly', 'text', 'all', 'native', 380, 0, 20, '', '', '', '', '', 3, '', '', '',
'specialchar', 'no', ''),
(1, 'multi', 'Multi', 'show', 'fieldset', 'all', 'native', 400, 0, 0, '', '', '', '', '', 4, '', '', '',
'specialchar', 'no', ''),
......@@ -296,6 +307,14 @@ VALUES
100, '', 'yes', '', '', '', '', '', 'specialchar'),
(2, 'subrecordOption', 'Subrecord Option', 'show', 'checkbox', 'all', 'native', 200, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#subrecord-option">Info</a>', '', '', '',
'', 100, '', 'yes', '', '', '', '{{ SELECT IF("{{type:FRE:alnumx}}"="subrecord" AND "{{class:FRE:alnumx}}"="native", "show", "hidden") }}', '', 'specialchar'),
(2, 'parameterLanguageA', 'Language: {{FORM_LANGUAGE_A_LABEL:YE}}', 'show', 'text', 'all', 'native', 210, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '{{SELECT IF("{{FORM_LANGUAGE_A_ID:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageB', 'Language: {{FORM_LANGUAGE_B_LABEL:YE}}', 'show', 'text', 'all', 'native', 210, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '{{SELECT IF("{{FORM_LANGUAGE_B_ID:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageC', 'Language: {{FORM_LANGUAGE_C_LABEL:YE}}', 'show', 'text', 'all', 'native', 210, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '{{SELECT IF("{{FORM_LANGUAGE_C_ID:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'parameterLanguageD', 'Language: {{FORM_LANGUAGE_D_LABEL:YE}}', 'show', 'text', 'all', 'native', 210, '60,2', 0,
'<a href="{{DOCUMENTATION_QFQ:Y}}#multi-language-form">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '{{SELECT IF("{{FORM_LANGUAGE_D_ID:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'encode', 'Encode', 'show', 'radio', 'all', 'native', 300, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#field-encode">Info</a>', '', '', '', 'buttonClass=btn-default', 101, '', 'no', '', '', '', '', '', 'specialchar'),
(2, 'checkType', 'Check Type', 'show', 'radio', 'all', 'native', 310, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#field-checkType">Info</a>', '', '', '', 'buttonClass=btn-default', 101, '', 'yes', '', '', '', '', '', 'specialchar'),
(2, 'checkPattern', 'Check Pattern', 'show', 'text', 'all', 'native', 320, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#field-checkType">Info</a>', '', '', '', '', 101, '', 'yes', '', '', '',
......
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