Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e8caa5df
Commit
e8caa5df
authored
Jan 27, 2016
by
Carsten Rose
Browse files
wrapElement() rewritten to Marshaller Functions
parent
49e40991
Changes
7
Hide whitespace changes
Inline
Side-by-side
LAYOUT.md
0 → 100644
View file @
e8caa5df
= Plain =
<form>
# Element 1
<p>Title</p>
<p><input type="input"></p>
# Element n
<p>Name</p>
<p><input type="input"></p>
</form>
# Subrecord
<table>
<tr><th>
id
</th>
</tr>
<tr><td>
1
</td></tr>
<tr><td>
2
</td></tr>
</table>
= Table =
<form>
<table>
<tr>
# Element 1
<td>
Title
</td>
<td><input
type=
"input"
></td>
<td>
note
</td>
</tr>
<tr>
# Element 2
<td>
Name
</td>
<td><input
type=
"input"
></td>
<td>
note
</td>
</tr>
<tr>
# Fieldset
<td colspan=3>
<table>
<tr>
# Element 3
<td>Name</td> <td><input type="input"></td> <td>note</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
# Subrecord
<table>
<tr><th>
id
</th>
</tr>
<tr><td>
1
</td></tr>
<tr><td>
2
</td></tr>
</table>
= Bootstrap =
<div
class=
"container-fluid"
>
# Ttitle
<div
class=
"row hidden-xs"
>
<div
class=
"col-md-12"
>
<h1>
Title with a long text
</h1>
</div>
</div>
# Pills & Button
<div class="row">
<div class="col-md-10">
<ul id="myTabs" class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="#person" data-toggle="tab">Person</a></li>
<li role="presentation"><a href="#person2" data-toggle="tab">Person2</a></li>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button">
more <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#arbeitsgruppe" data-toggle="tab">Arbeitsgruppe</a></li>
<li><a href="#publikation" data-toggle="tab">Publikation</a></li>
</ul> # Dropdown-menu
</li> # Dropdown item
</ul> # pill
</div> # class="col-md-10"
<div class="col-md-2 ">
# button
</div> # Button
</div> # class="row" (Pill & Button)
# Form
<form class="form-horizontal"><div class="tab-content">
# Pill 1
<div role="tabpanel" class="tab-pane active" id="person">
<div class="form-group">
<div class="col-md-2">
<label for="id" class="control-label">Name</label>
</div>
<div class="col-md-6 ">
<input id="name" type="text" class="form-control">
</div>
<div class="col-md-4">
<p class="help-block ">Abgekürzter Vorname. Für "Christian" z.B. "Ch."</p>
</div>
</div> # class="form-group"
<div class="form-group">
<div class="col-md-2">
<label for="id" class="control-label">Firstname</label>
</div>
<div class="col-md-6 ">
<input id="firstname" type="text" class="form-control">
</div>
<div class="col-md-4">
<p class="help-block ">Please write the complete firstname</p>
</div>
</div> # class="form-group"
</div> # class="tab-pane" Pill 1
# Pill 2
<div role="tabpanel" class="tab-pane active" id="person">
<div class="form-group">
<div class="col-md-2">
<label for="id" class="control-label">Name</label>
</div>
<div class="col-md-6 ">
<input id="name" type="text" class="form-control">
</div>
<div class="col-md-4">
<p class="help-block ">Abgekürzter Vorname. Für "Christian" z.B. "Ch."</p>
</div>
</div> # class="form-group"
<div class="form-group">
<div class="col-md-8">
<fieldset>
<div class="form-group">
<div class="col-md-2"> ...
<div class="col-md-6"> ...
<div class="col-md-4"> ...
</div>
</fieldset>
</div>
<div class="col-md-4">
<p class="help-block ">Abgekürzter Vorname. Für "Christian" z.B. "Ch."</p>
</div>
</div> # class="form-group"
# fieldset: nested
<div class="tab-content">
</div> # class="tab-content"
</div> # class="tab-pane" Pill 2
</div> # class="tab-content" </form>
</div>
# class="container-fluid"
qfq/AbstractBuildForm.php
View file @
e8caa5df
...
...
@@ -64,6 +64,24 @@ abstract class AbstractBuildForm {
'pill'
=>
'Pill'
];
$this
->
buildRowName
=
[
'checkbox'
=>
'Native'
,
'dateJQW'
=>
'Native'
,
'datetimeJQW'
=>
'Native'
,
'email'
=>
'Native'
,
'gridJQW'
=>
'Native'
,
'hidden'
=>
'Native'
,
'input'
=>
'Native'
,
'note'
=>
'Native'
,
'password'
=>
'Native'
,
'radio'
=>
'Native'
,
'select'
=>
'Native'
,
'subrecord'
=>
'Subrecord'
,
'upload'
=>
'Native'
,
'fieldset'
=>
'Fieldset'
,
'pill'
=>
'Pill'
];
$this
->
inputCheckPattern
=
[
'min|max'
=>
'min="%s"|max="%s"'
,
'pattern'
=>
'pattern="%s"'
,
...
...
@@ -97,6 +115,8 @@ abstract class AbstractBuildForm {
$html
.
=
$this
->
elements
(
$this
->
store
->
getVar
(
SIP_RECORD_ID
,
STORE_SIP
),
$filter
);
}
// $html .= $this->wrapItem(WRAP_SETUP_OUTER, $elementsHtml);
// close the form
$html
.
=
$this
->
tail
();
...
...
@@ -145,18 +165,33 @@ abstract class AbstractBuildForm {
$htmlFormElementId
=
$formElement
[
'name'
]
.
':'
.
$recordId
;
$html
.
=
$this
->
wrapElement
(
$htmlFormElementId
,
$formElement
,
$value
);
// Construct Marshaller Name
$buildElementFunctionName
=
'build'
.
$this
->
buildElementFunctionName
[
$formElement
[
'type'
]];
// Render pure element
$elementHtml
=
$this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
);
// Construct Marshaller Name
$buildRowName
=
'buildRow'
.
$this
->
buildRowName
[
$formElement
[
'type'
]];
$html
.
=
$this
->
$buildRowName
(
$formElement
,
$elementHtml
);
}
return
$html
;
}
abstract
public
function
wrapElement
(
$htmlFormElementId
,
$formElement
,
$value
);
abstract
public
function
tail
();
abstract
public
function
doSubrecords
();
abstract
public
function
buildRowNative
(
$formElement
,
$elementHtml
);
abstract
public
function
buildRowPill
(
$formElement
,
$elementHtml
);
abstract
public
function
buildRowFieldset
(
$formElement
,
$elementHtml
);
abstract
public
function
buildRowSubrecord
(
$formElement
,
$elementHtml
);
/**
* @param $item
* @param $value
...
...
@@ -851,7 +886,6 @@ abstract class AbstractBuildForm {
// restore parent processed FE's
$this
->
feSpecNative
=
$tmpStore
;
return
$html
;
}
...
...
qfq/BuildFormBootstrap.php
View file @
e8caa5df
...
...
@@ -22,13 +22,31 @@ require_once(__DIR__ . '/../qfq/exceptions/UserException.php');
*/
class
BuildFormBootstrap
extends
AbstractBuildForm
{
private
$isFirstPill
;
/**
* @param array $formSpec
* @param array $feSpecAction
* @param array $feSpecNative
*/
public
function
__construct
(
array
$formSpec
,
array
$feSpecAction
,
array
$feSpecNative
)
{
parent
::
__construct
(
$formSpec
,
$feSpecAction
,
$feSpecNative
);
$this
->
isFirstPill
=
true
;
}
/**
*
*/
public
function
fillWrap
()
{
// $this->wrap[WRAP_SETUP_OUTER][WRAP_SETUP_START] = '<div class="tab-content">';
// $this->wrap[WRAP_SETUP_OUTER][WRAP_SETUP_END] = '</div>';
$this
->
wrap
[
WRAP_SETUP_TITLE
][
WRAP_SETUP_START
]
=
'<div class="row hidden-xs"><div class="col-md-12"><h1>'
;
$this
->
wrap
[
WRAP_SETUP_TITLE
][
WRAP_SETUP_END
]
=
'</h1></div></div>'
;
// Element: Label + Input + Note
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_START
]
=
'<div class="form-group">'
;
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_END
]
=
'</div>'
;
...
...
@@ -188,45 +206,50 @@ BUTTONS;
* @param $value
* @return string
*/
public
function
wrapElement
(
$
htmlF
ormElement
Id
,
$
formE
lement
,
$value
)
{
public
function
wrapElement
(
$
f
ormElement
,
$
e
lement
Html
)
{
$html
=
''
;
// Construct Marshaller Name
$buildElementFunctionName
=
'build'
.
$this
->
buildElementFunctionName
[
$formElement
[
'type'
]];
if
(
$formElement
[
'type'
]
===
'subrecord'
)
{
// subrecord in render='table' are outside the table
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'label'
]));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
)));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'note'
]));
// if ($formElement['type'] === 'subrecord') {
// // subrecord in render='table' are outside the table
// $html .= $this->wrapItem(WRAP_SETUP_ELEMENT, $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['label']));
// $html .= $this->wrapItem(WRAP_SETUP_ELEMENT, $this->wrapItem(WRAP_SETUP_SUBRECORD, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value)));
// $html .= $this->wrapItem(WRAP_SETUP_ELEMENT, $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['note']));
// } else {
// if ($formElement['nestedInFieldSet'] === 'no') {
// $html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
//
// $htmlElement = $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value);
// if ($formElement['type'] == 'pill') {
// $html .= '<div role="tabpanel" class="tab-pane" id="' . $this->createAnker($formElement['id']) . '">';
//
// $html .= $htmlElement;
// $html .= '</div>';
// } else {
// $html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
// $html .= $this->wrapItem(WRAP_SETUP_INPUT, $htmlElement);
// }
//
// $html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
// $html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
// } else {
// }
if
(
$formElement
[
'type'
]
==
'pill'
)
{
}
else
{
if
(
$formElement
[
'nestedInFieldSet'
]
===
'no'
)
{
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_START
];
$htmlElement
=
$this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
);
if
(
$formElement
[
'type'
]
==
'pill'
)
{
$html
=
'<div role="tabpanel" class="tab-pane active" id="'
.
$this
->
createAnker
(
$formElement
[
'id'
])
.
'">'
;
$html
.
=
$htmlElement
;
$html
.
=
'</div>'
;
}
else
{
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$this
->
buildLabel
(
$htmlFormElementId
,
$formElement
[
'label'
]));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$htmlElement
);
}
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_NOTE
,
$formElement
[
'note'
]);
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_END
];
}
else
{
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$this
->
buildLabel
(
$htmlFormElementId
,
$formElement
[
'label'
]));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
));
if
(
$formElement
[
'note'
]
!==
''
)
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$formElement
[
'note'
]);
}
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$formElement
[
'label'
]);
}
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$elementHtml
);
if
(
$formElement
[
'note'
]
!==
''
)
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_NOTE
,
$formElement
[
'note'
]);
// }
return
$html
;
}
/**
* @param array $formElement
* @param $htmlFormElementId
...
...
@@ -234,24 +257,58 @@ BUTTONS;
* @return mixed
*/
public
function
buildPill
(
array
$formElement
,
$htmlFormElementId
,
$value
)
{
$html
=
''
;
// save parent processed FE's
$tmpStore
=
$this
->
feSpecNative
;
// $html = '<div role="tabpanel" class="tab-pane active" id="' . $this->createAnker($formElement['id']) .'">';
// child FE's
$sql
=
SQL_FORM_ELEMENT
;
$this
->
feSpecNative
=
$this
->
db
->
sql
(
$sql
,
ROW_REGULAR
,
[
'yes'
,
$this
->
formSpec
[
"id"
],
'native,container'
,
$formElement
[
'id'
]]);
HelperFormElement
::
explodeParameter
(
$this
->
feSpecNative
);
$html
=
$this
->
elements
(
$this
->
store
->
getVar
(
SIP_RECORD_ID
,
STORE_SIP
),
FORM_ELEMENTS_NATIVE_SUBRECORD
);
// $html .= '</div>';
// restore parent processed FE's
$this
->
feSpecNative
=
$tmpStore
;
return
$html
;
}
public
function
buildRowNative
(
$formElement
,
$elementHtml
)
{
$html
=
''
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$formElement
[
'label'
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$elementHtml
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_NOTE
,
$formElement
[
'note'
],
true
);
$html
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$html
);
return
$html
;
}
public
function
buildRowPill
(
$formElement
,
$elementHtml
)
{
$html
=
''
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$elementHtml
);
$active
=
$this
->
isFirstPill
?
' active'
:
''
;
$html
=
$this
->
wrapTag
(
'<div role="tabpanel" class="tab-pane'
.
$active
.
'" id="'
.
$this
->
createAnker
(
$formElement
[
'id'
])
.
'">'
,
$html
);
$this
->
isFirstPill
=
false
;
return
$html
;
}
public
function
buildRowFieldset
(
$formElement
,
$elementHtml
)
{
}
public
function
buildRowSubrecord
(
$formElement
,
$elementHtml
)
{
$html
=
''
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'label'
]));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$elementHtml
));
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'note'
]));
return
$html
;
}
...
...
qfq/BuildFormPlain.php
View file @
e8caa5df
...
...
@@ -73,17 +73,17 @@ class BuildFormPlain extends AbstractBuildForm {
* @param $value
* @return string
*/
public
function
wrapElement
(
$htmlF
ormElement
Id
,
$
formE
lement
,
$value
)
{
public
function
buildRowNative
(
$f
ormElement
,
$
e
lement
Html
)
{
$html
=
''
;
// Construct Marshaller Name
$buildElementFunctionName
=
'build'
.
$this
->
buildElementFunctionName
[
$formElement
[
'type'
]];
//
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
if
(
$formElement
[
'nestedInFieldSet'
]
===
'no'
)
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_START
];
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$this
->
buildLabel
(
$htmlFormElementId
,
$formElement
[
'label'
])
)
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$
this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
)
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$formElement
[
'label'
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$
elementHtml
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_NOTE
,
$formElement
[
'note'
]);
if
(
$formElement
[
'nestedInFieldSet'
]
===
'no'
)
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_END
];
...
...
@@ -108,4 +108,16 @@ class BuildFormPlain extends AbstractBuildForm {
return
$html
;
}
public
function
buildRowPill
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowPill() method.
}
public
function
buildRowFieldset
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowFieldset() method.
}
public
function
buildRowSubrecord
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowSubrecord() method.
}
}
\ No newline at end of file
qfq/BuildFormTable.php
View file @
e8caa5df
...
...
@@ -64,8 +64,8 @@ class BuildFormTable extends AbstractBuildForm {
$html
=
''
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_TITLE
,
$this
->
formSpec
[
'title'
],
true
);
$html
.
=
'<table>'
;
$html
.
=
'<form action="?" method="post" target="_top" accept-charset="UTF-8">'
;
$html
.
=
'<table>'
;
return
$html
;
}
...
...
@@ -76,7 +76,7 @@ class BuildFormTable extends AbstractBuildForm {
* @param $value
* @return string
*/
public
function
wrapElement
(
$htmlF
ormElement
Id
,
$
formE
lement
,
$value
)
{
public
function
buildRowNative
(
$f
ormElement
,
$
e
lement
Html
)
{
$html
=
''
;
// Construct Marshaller Name
...
...
@@ -85,18 +85,18 @@ class BuildFormTable extends AbstractBuildForm {
if
(
$formElement
[
'type'
]
===
'subrecord'
)
{
// subrecord in render='table' are outside the table
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'label'
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$
this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
)
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$
elementHtml
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_SUBRECORD
,
$formElement
[
'note'
]);
}
else
{
if
(
$formElement
[
'nestedInFieldSet'
]
===
'no'
)
{
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_START
];
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$this
->
buildLabel
(
$htmlFormElementId
,
$formElement
[
'label'
])
)
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$
this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
)
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
$formElement
[
'label'
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
$
elementHtml
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_NOTE
,
$formElement
[
'note'
]);
$html
.
=
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_END
];
}
else
{
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$this
->
buildLabel
(
$htmlFormElementId
,
$formElement
[
'label'
])
)
;
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$
this
->
$buildElementFunctionName
(
$formElement
,
$htmlFormElementId
,
$value
)
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$formElement
[
'label'
]);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$
elementHtml
);
if
(
$formElement
[
'note'
]
!==
''
)
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_IN_FIELDSET
,
$formElement
[
'note'
]);
}
...
...
@@ -113,14 +113,26 @@ class BuildFormTable extends AbstractBuildForm {
$sip
=
$this
->
store
->
getVar
(
CLIENT_SIP
,
STORE_CLIENT
);
$sipName
=
CLIENT_SIP
;
$html
.
=
$this
->
buildHidden
(
array
(),
$sipName
,
$sip
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_LABEL
,
''
,
false
);
$html
.
=
$this
->
wrapItem
(
WRAP_SETUP_INPUT
,
'<input type="submit" value="Submit">'
);
$html
=
$this
->
wrapItem
(
WRAP_SETUP_ELEMENT
,
$html
);
$html
.
=
'</table></form>'
;
$html
.
=
'</table>'
;
$html
.
=
$this
->
buildHidden
(
array
(),
$sipName
,
$sip
);
$html
.
=
'</form>'
;
return
$html
;
}
public
function
buildRowPill
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowPill() method.
}
public
function
buildRowFieldset
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowFieldset() method.
}
public
function
buildRowSubrecord
(
$formElement
,
$elementHtml
)
{
// TODO: Implement buildRowSubrecord() method.
}
}
\ No newline at end of file
sql/formEditor.sql
View file @
e8caa5df
...
...
@@ -23,6 +23,8 @@ CREATE TABLE IF NOT EXISTS `Form` (
`bsInputColumns`
VARCHAR
(
255
)
NOT
NULL
DEFAULT
''
,
`bsNoteColumns`
VARCHAR
(
255
)
NOT
NULL
DEFAULT
''
,
`parameter`
TEXT
NOT
NULL
,
`deleted`
ENUM
(
'yes'
,
'no'
)
NOT
NULL
DEFAULT
'no'
,
`modified`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created`
DATETIME
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
,
...
...
@@ -115,40 +117,44 @@ DELIMITER ;
#
#
FormEditor
INSERT
INTO
Form
(
name
,
title
,
noteInternal
,
tableName
,
permitNew
,
permitEdit
,
render
,
multiSql
)
VALUES
INSERT
INTO
Form
(
name
,
title
,
noteInternal
,
tableName
,
permitNew
,
permitEdit
,
render
,
multiSql
,
parameter
)
VALUES
(
'form'
,
'Form Editor: {{SELECT id, " / ", title FROM Form WHERE id = {{recordId:SZ}}}}'
,
'Please secure the form'
,
'Form'
,
'always'
,
'always'
,
'
table'
,
'
'
);
'Form'
,
'always'
,
'always'
,
'
bootstrap'
,
''
,
'maxVisiblePill=3
'
);
#
FormEditor
:
FormElements
INSERT
INTO
FormElement
(
formId
,
name
,
label
,
mode
,
type
,
ord
,
size
,
maxLength
,
note
,
clientJs
,
value
,
sql1
,
sql2
,
parameter
,
feIdContainer
)
VALUES
(
1
,
'id'
,
'id'
,
'readonly'
,
'input'
,
10
,
10
,
11
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'name'
,
'Name'
,
'show'
,
'input'
,
20
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
'autofocus=on'
,
0
),
(
1
,
'title'
,
'Title'
,
'show'
,
'input'
,
30
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'noteInternal'
,
'Note'
,
'show'
,
'input'
,
40
,
'40,3'
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'tableName'
,
'Table'
,
'show'
,
'select'
,
50
,
0
,
0
,
''
,
''
,
''
,
'{{!SHOW tables}}'
,
''
,
''
,
0
),
(
1
,
'permitNew'
,
'Permit New'
,
'show'
,
'radio'
,
60
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'permitEdit'
,
'Permit Edit'
,
'show'
,
'radio'
,
70
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'permitUrlParameter'
,
'Permit Url Parameter'
,
'show'
,
'input'
,
80
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'render'
,
'Render'
,
'show'
,
'radio'
,
90
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'multi'
,
'Multi'
,
'show'
,
'fieldset'
,
100
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'multiMode'
,
'Multi Mode'
,
'show'
,
'radio'
,
100
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
10
),
(
1
,
'multiSql'
,
'Multi SQL'
,
'show'
,
'input'
,
110
,
'40,3'
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
10
),
(
1
,
'multiDetailForm'
,
'Multi Detail Form'
,
'show'
,
'input'
,
120
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
10
),
(
1
,
'multiDetailFormParameter'
,
'Multi Detail Form Parameter'
,
'show'
,
'input'
,
130
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
10
),
(
1
,
'forwardMode'
,
'Forward'
,
'show'
,
'radio'
,
140
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'forwardPage'
,
'Forward Page'
,
'show'
,
'input'
,
150
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'bsLabelColumns'
,
'BS Label Columns'
,
'show'
,
'input'
,
160
,
40
,
250
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'bsInputColumns'
,
'BS Input Columns'
,
'show'
,
'input'
,
160
,
40
,
250
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'bsNoteColumns'
,
'BS Note Columns'
,
'show'
,
'input'
,
160
,
40
,
250
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'deleted'
,
'Deleted'
,
'show'
,
'checkbox'
,
170
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'modified'
,
'Modified'
,
'readonly'
,
'input'
,
180
,
40
,
20
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'created'
,
'Created'
,
'readonly'
,
'input'
,
180
,
40
,
20
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
''
,
'FormElements'
,
'show'
,
'subrecord'
,
200
,
0
,
0
,
''
,
''
,
''
,
'{{!SELECT * FROM FormElement WHERE formId=1}}'
,
''
,
''
,
0
);
(
1
,
'basic'
,
'Basic'
,
'show'
,
'pill'
,
10
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'permission'
,
'Permission'
,
'show'
,
'pill'
,
20
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'various'
,
'Various'
,
'show'
,
'pill'
,
30
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'formelement'
,
'Formelement'
,
'show'
,
'pill'
,
40
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
0
),
(
1
,
'id'
,
'id'
,
'readonly'
,
'input'
,
100
,
10
,
11
,
''
,
''
,
''
,
''
,
''
,
''
,
1
),
(
1
,
'name'
,
'Name'
,
'show'
,
'input'
,
120
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
'autofocus=on'
,
1
),
(
1
,
'title'
,
'Title'
,
'show'
,
'input'
,
130
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
1
),
(
1
,
'noteInternal'
,
'Note'
,
'show'
,
'input'
,
140
,
'40,3'
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
1
),
(
1
,
'tableName'
,
'Table'
,
'show'
,
'select'
,
150
,
0
,
0
,
''
,
''
,
''
,
'{{!SHOW tables}}'
,
''
,
''
,
1
),
(
1
,
'permitNew'
,
'Permit New'
,
'show'
,
'radio'
,
160
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
2
),
(
1
,
'permitEdit'
,
'Permit Edit'
,
'show'
,
'radio'
,
170
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
2
),
(
1
,
'permitUrlParameter'
,
'Permit Url Parameter'
,
'show'
,
'input'
,
180
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
2
),
(
1
,
'render'
,
'Render'
,
'show'
,
'radio'
,
190
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
2
),
(
1
,
'multi'
,
'Multi'
,
'show'
,
'fieldset'
,
210
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
3
),
(
1
,
'multiMode'
,
'Multi Mode'
,
'show'
,
'radio'
,
220
,
0
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
3
),
(
1
,
'multiSql'
,
'Multi SQL'
,
'show'
,
'input'
,
230
,
'40,3'
,
0
,
''
,
''
,
''
,
''
,
''
,
''
,
3
),
(
1
,
'multiDetailForm'
,
'Multi Detail Form'
,
'show'
,
'input'
,
240
,
40
,
255
,
''
,
''
,
''
,
''
,
''
,
''
,
3
),