Commit 240671b1 authored by Carsten  Rose's avatar Carsten Rose
Browse files

formEditor.sql: added column FormElement.subrecordOption. removed columne...

formEditor.sql: added column FormElement.subrecordOption. removed columne FormElement.debug. Rearranged code to be more easieble expandeble. Fixed typo in 'maxLength'
parent 1bc9bb8c
......@@ -52,48 +52,47 @@ 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',
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'readonly', 'required', 'lock', 'disabled') NOT NULL DEFAULT 'show',
`class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`type` ENUM('checkbox', 'dateJQW', 'datetimeJQW', 'gridJQW', 'hidden', 'text',
'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
'before_load', 'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load',
'after_save', 'after_insert', 'after_update', 'after_delete', 'feGroup',
'sendmail') NOT NULL DEFAULT 'text',
`checkType` ENUM('', 'min|max', 'pattern', 'number', 'email') NOT NULL DEFAULT '',
`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 '',
`note` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(255) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`sql2` TEXT NOT NULL,
`parameter` TEXT NOT NULL,
`clientJs` TEXT NOT NULL,
`feGroup` VARCHAR(255) NOT NULL DEFAULT '',
`debug` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`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',
`id` INT(11) NOT NULL AUTO_INCREMENT,
`formId` INT(11) NOT NULL,
`feIdContainer` INT(11) NOT NULL DEFAULT '0',
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'readonly', 'required', 'lock', 'disabled') NOT NULL DEFAULT 'show',
`class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`type` ENUM('checkbox', 'dateJQW', 'datetimeJQW', 'gridJQW', 'hidden', 'text',
'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
'before_load', 'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load',
'after_save', 'after_insert', 'after_update', 'after_delete', 'feGroup',
'sendmail') NOT NULL DEFAULT 'text',
`subrecordOption` SET('edit', 'delete', 'new') NOT NULL DEFAULT '',
`checkType` ENUM('', 'min|max', 'pattern', 'number', 'email') NOT NULL DEFAULT '',
`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 '',
`note` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(255) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`sql2` TEXT NOT NULL,
`parameter` 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,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `formId` (`formId`),
......@@ -168,48 +167,51 @@ VALUES
INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, render, multiSql, parameter) VALUES
('formElement', 'Form Element Editor : {{SELECT id, " / ", title FROM Form WHERE id = {{recordId:S0}}}}',
'Please secure the form',
'FormElement', 'always', 'always', 'bootstrap', '', 'maxVisiblePill=5');
'FormElement', 'always', 'always', 'bootstrap', '', 'maxVisiblePill=5');
# FormEditor: FormElements
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, debug)
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption)
VALUES
(100, 2, 'basic', 'Basic', 'show', 'pill', 'container', 10, 0, 0, '', '', '', '', '', '', 0, 'no'),
(101, 2, 'check_order', 'Check & Order', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, 'no'),
(102, 2, 'layout', 'Layout', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, 'no'),
(103, 2, 'value', 'Value', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, 'no'),
(104, 2, 'info', 'Info', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, 'no'),
(100, 2, 'basic', 'Basic', 'show', 'pill', 'container', 10, 0, 0, '', '', '', '', '', '', 0, ''),
(101, 2, 'check_order', 'Check & Order', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, ''),
(102, 2, 'layout', 'Layout', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, ''),
(103, 2, 'value', 'Value', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, ''),
(104, 2, 'info', 'Info', 'show', 'pill', 'container', 20, 0, 0, '', '', '', '', '', '', 0, '');
INSERT INTO FormElement (formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption)
VALUES
(110, 2, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 100, 'no'),
(111, 2, 'formId', 'formId', 'readonly', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 100, 'no'),
(112, 2, 'feIdContainer', 'Container', 'show', 'select', 'native', 150, 0, 0, '', '', '',
(2, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 100, ''),
(2, 'formId', 'formId', 'readonly', 'text', 'native', 110, 40, 255, '', '', '', '', '', '', 100, ''),
(2, 'feIdContainer', 'Container', 'show', 'select', 'native', 120, 0, 0, '', '', '',
'{{!SELECT fe.id, CONCAT(fe.class, " / ", fe.label) FROM FormElement As fe WHERE fe.formId={{formId}} AND fe.class="container" ORDER BY fe.ord }}',
'', 'emptyItemAtStart', 100, 'no'),
(113, 2, 'enabled', 'Enabled', 'show', 'checkbox', 'native', 120, 0, 0, '', '', '', '', '', '', 100, 'no'),
(114, 2, 'name', 'Name', 'show', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 100, 'no'),
(115, 2, 'label', 'Label', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 100, 'no'),
(116, 2, 'mode', 'Mode', 'show', 'select', 'native', 120, 0, 255, '', '', '', '', '', '', 100, 'no'),
(117, 2, 'class', 'Class', 'show', 'select', 'native', 120, 0, 255, '', '', '', '', '', '', 100, 'no'),
(118, 2, 'type', 'Type', 'show', 'select', 'native', 120, 0, 255, '', '', '', '', '', '', 100, 'no'),
(119, 2, 'checkType', 'Check Type', 'show', 'select', 'native', 120, 0, 255, '', '', '', '', '', '', 101, 'no'),
(120, 2, 'checkPattern', 'Check Pattern', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 101, 'no'),
(121, 2, 'onChange', 'JS onChange', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 101, 'no'),
(122, 2, 'ord', 'Order', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 101, 'no'),
(123, 2, 'tabindex', 'tabindex', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 101, 'no'),
(124, 2, 'size', 'Size', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(125, 2, 'maxlenght', 'Maxlength', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(126, 2, 'note', 'note', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(127, 2, 'tooltip', 'Tooltip', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(128, 2, 'placeholder', 'Placeholder', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(129, 2, 'value', 'value', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 102, 'no'),
(130, 2, 'sql1', 'sql1', 'show', 'text', 'native', 130, '40,4', 255, '', '', '', '', '', '', 103, 'no'),
(131, 2, 'parameter', 'Parameter', 'show', 'text', 'native', 130, '40,4', 255, '', '', '', '', '', '', 103, 'no'),
(132, 2, 'clientJs', 'ClientJS', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 103, 'no'),
(133, 2, 'feGroup', 'feGroup', 'show', 'text', 'native', 130, 40, 255, '', '', '', '', '', '', 104, 'no'),
(134, 2, 'debug', 'Debug', 'show', 'checkbox', 'native', 130, 0, 0, '', '', '', '', '', '', 104, 'no'),
(135, 2, 'deleted', 'Deleted', 'show', 'checkbox', 'native', 400, 0, 0, '', '', '', '', '', '', 104, 'no'),
(136, 2, 'modified', 'Modified', 'readonly', 'text', 'native', 410, 40, 20, '', '', '', '', '', '', 104, 'no'),
(137, 2, 'created', 'Created', 'readonly', 'text', 'native', 420, 40, 20, '', '', '', '', '', '', 104, 'no');
'', 'emptyItemAtStart', 100, ''),
(2, 'enabled', 'Enabled', 'show', 'checkbox', 'native', 130, 0, 0, '', '', '', '', '', '', 100, ''),
(2, 'name', 'Name', 'show', 'text', 'native', 140, 40, 255, '', '', '', '', '', '', 100, ''),
(2, 'label', 'Label', 'show', 'text', 'native', 150, 40, 255, '', '', '', '', '', '', 100, ''),
(2, 'mode', 'Mode', 'show', 'select', 'native', 160, 0, 255, '', '', '', '', '', '', 100, ''),
(2, 'class', 'Class', 'show', 'select', 'native', 170, 0, 255, '', '', '', '', '', '', 100, ''),
(2, 'type', 'Type', 'show', 'select', 'native', 180, 0, 255, '', '', '', '', '', '', 100, ''),
(2, 'subrecordOption', 'Subrecord Option', 'show', 'checkbox', 'native', 190, 0, 255, '', '', '', '', '', '', 100, ''),
(2, 'checkType', 'Check Type', 'show', 'select', 'native', 200, 0, 255, '', '', '', '', '', '', 101, ''),
(2, 'checkPattern', 'Check Pattern', 'show', 'text', 'native', 210, 40, 255, '', '', '', '', '', '', 101, ''),
(2, 'onChange', 'JS onChange', 'show', 'text', 'native', 220, 40, 255, '', '', '', '', '', '', 101, ''),
(2, 'ord', 'Order', 'show', 'text', 'native', 230, 40, 255, '', '', '', '', '', '', 101, ''),
(2, 'tabindex', 'tabindex', 'show', 'text', 'native', 240, 40, 255, '', '', '', '', '', '', 101, ''),
(2, 'size', 'Size', 'show', 'text', 'native', 250, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'maxlength', 'Maxlength', 'show', 'text', 'native', 260, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'note', 'note', 'show', 'text', 'native', 270, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'tooltip', 'Tooltip', 'show', 'text', 'native', 280, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'placeholder', 'Placeholder', 'show', 'text', 'native', 290, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'value', 'value', 'show', 'text', 'native', 300, 40, 255, '', '', '', '', '', '', 102, ''),
(2, 'sql1', 'sql1', 'show', 'text', 'native', 310, '40,4', 255, '', '', '', '', '', '', 103, ''),
(2, 'parameter', 'Parameter', 'show', 'text', 'native', 320, '40,4', 255, '', '', '', '', '', '', 103, ''),
(2, 'clientJs', 'ClientJS', 'show', 'text', 'native', 330, 40, 255, '', '', '', '', '', '', 103, ''),
(2, 'feGroup', 'feGroup', 'show', 'text', 'native', 340, 40, 255, '', '', '', '', '', '', 104, ''),
(2, 'deleted', 'Deleted', 'show', 'checkbox', 'native', 350, 0, 0, '', '', '', '', '', '', 104, ''),
(2, 'modified', 'Modified', 'readonly', 'text', 'native', 360, 40, 20, '', '', '', '', '', '', 104, ''),
(2, 'created', 'Created', 'readonly', 'text', 'native', 370, 40, 20, '', '', '', '', '', '', 104, '');
# FormEditor: Small
INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, render, multiSql, parameter) VALUES
......@@ -218,11 +220,11 @@ INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, r
'Person', 'always', 'always', 'bootstrap', '', '');
# FormEditor: FormElements
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, debug)
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption)
VALUES
(200, 3, 'name', 'Name', 'show', 'text', 'native', 10, 50, 255, '', '', '', '', '', '', 0, 'no'),
(201, 3, 'firstname', 'Firstname', 'show', 'text', 'native', 10, 50, 255, '', '', '', '', '', '', 0, 'no');
(200, 3, 'name', 'Name', 'show', 'text', 'native', 10, 50, 255, '', '', '', '', '', '', 0, ''),
(201, 3, 'firstname', 'Firstname', 'show', 'text', 'native', 10, 50, 255, '', '', '', '', '', '', 0, '');
# ----------------------------------------------------------------------
#
......@@ -232,17 +234,17 @@ INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, r
('formplain', 'Form: Plain', '', 'Form', 'always', 'always', 'plain', '', '');
# FormEditor: FormElements
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, debug)
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption)
VALUES
(300, 4, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 0, 'no'),
(310, 4, 'name', 'Name', 'show', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 0, 'no');
(300, 4, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 0, ''),
(310, 4, 'name', 'Name', 'show', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 0, '');
# Form: table
INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, render, multiSql, parameter) VALUES
('formtable', 'Form: Table', '', 'Form', 'always', 'always', 'table', '', '');
# FormEditor: FormElements
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, debug)
INSERT INTO FormElement (id, formId, name, label, mode, type, class, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer, subrecordOption)
VALUES
(400, 5, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 0, 'no'),
(410, 5, 'name', 'Name', 'show', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 0, 'no');
(400, 5, 'id', 'id', 'readonly', 'text', 'native', 100, 10, 11, '', '', '', '', '', '', 0, ''),
(410, 5, 'name', 'Name', 'show', 'text', 'native', 120, 40, 255, '', '', '', '', '', '', 0, '');
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