Commit 762ea337 authored by Carsten  Rose's avatar Carsten Rose
Browse files

testtables.sql: Subform 'address' created

parent a0fbbf86
......@@ -16,7 +16,6 @@ require_once(__DIR__ . '/../../qfq/qfq/exceptions/DbException.php');
class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public function showAction() {
try {
$contentObject = $this->configurationManager->getContentObject();
$qfq = new \qfq\QuickFormQuery($contentObject->data);
......
......@@ -58,7 +58,7 @@ REPLACE INTO Form (id, name, title, noteInternal, tableName, permitNew, permitEd
'Please secure the form',
'Person', 'always', 'always', 'bootstrap', '', '');
# FormEditor: FormElements
# FormEditor: FormElements person
REPLACE INTO FormElement (id, formId, name, label, mode, type, checkType, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption, modeSql)
VALUES
......@@ -72,27 +72,48 @@ VALUES
(504, 5, 'zeit', 'Zeit', 'show', 'time', 'alnumx', 'native', 60, 0, 0, '', '', '', '', '', '', 0, '', ''),
(505, 5, 'picture', 'Picture', 'show', 'upload', 'allbut', 'native', 70, 0, 0, '', '', '', '', '',
'pathFileName={{SELECT ''fileadmin/user/pictures/'', p.name, ''-{{_filename}}'' FROM Person AS p WHERE p.id={{r}} }}',
0, '', '');
0, '', ''),
(506, 5, '', 'Address', 'show', 'subrecord', 'all', 'native', 100, 0, 0, '', '', '',
'{{!SELECT a.id, a.street, a.city, a.country FROM Address AS a WHERE a.personId={{r:S0}} }}',
'', 'form=address\ndetail=id:personId', 0, 'new,edit,delete', '');
# Form: Address
REPLACE INTO Form (id, name, title, noteInternal, tableName, permitNew, permitEdit, render, multiSql, parameter) VALUES
(6, 'address',
'Person {{SELECT ": ", p.firstName, " ", p.name, " (", id, ")" FROM Person AS p WHERE p.id = {{personId:S0}}}}',
'',
'Address', 'always', 'always', 'bootstrap', '', '');
# FormEditor: FormElements address
REPLACE INTO FormElement (id, formId, name, label, mode, type, checkType, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption, modeSql)
VALUES
(600, 6, 'street', 'Street', 'show', 'text', 'all', 'native', 10, 0, 255, '', '', '', '', '', '', 0, '', ''),
(601, 6, 'city', 'City', 'show', 'text', 'all', 'native', 20, 0, 255, '', '', '', '', '', '', 0, '', ''),
(602, 6, 'country', 'Country', 'show', 'select', 'all', 'native', 30, 0, 255, '', '', '', '', '', '', 0, '', '');
# ----------------------------------------------------------------------
#
DROP TABLE IF EXISTS Address;
CREATE TABLE Address (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
personId BIGINT,
street VARCHAR(128),
city VARCHAR(128),
country ENUM('Switzerland', 'Austria', 'France', 'Germany'),
gr_id_typ BIGINT,
modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
id BIGINT AUTO_INCREMENT PRIMARY KEY,
personId BIGINT NOT NULL DEFAULT 0,
street VARCHAR(128) NOT NULL DEFAULT '',
city VARCHAR(128) NOT NULL DEFAULT '',
country ENUM('Switzerland', 'Austria', 'France', 'Germany') NOT NULL,
gr_id_typ BIGINT NOT NULL DEFAULT 0,
modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
);
INSERT INTO Address (personId, street, city) VALUES
(1, 'Side Street', 'Zurich'),
(1, 'Park Street', 'Zurich'),
(1, 'Winter Street', 'Zurich'),
(2, 'Summer Street', 'Zurich');
INSERT INTO Address (personId, street, city, country) VALUES
(1, 'Side Street', 'Zurich', 'Switzerland'),
(1, 'Park Street', 'Wien', 'Austria'),
(1, 'Winter Street', 'Paris', 'France'),
(2, 'Summer Street', 'Berlin', 'Germany');
Supports Markdown
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