Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
762ea337
Commit
762ea337
authored
May 25, 2016
by
Carsten Rose
Browse files
testtables.sql: Subform 'address' created
parent
a0fbbf86
Changes
2
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Controller/QfqController.php
View file @
762ea337
...
...
@@ -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
);
...
...
extension/qfq/sql/testtables.sql
View file @
762ea337
...
...
@@ -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
\n
detail=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
'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment