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

formEditor.sql: class / type - modified to implement fieldset & pill

parent 730162f7
...@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `Form` ( ...@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `Form` (
`permitNew` ENUM('sip', 'logged_in', 'logged_out', 'always', 'never') NOT NULL DEFAULT 'sip', `permitNew` ENUM('sip', 'logged_in', 'logged_out', 'always', 'never') NOT NULL DEFAULT 'sip',
`permitEdit` ENUM('sip', 'logged_in', 'logged_out', 'always', 'never') NOT NULL DEFAULT 'sip', `permitEdit` ENUM('sip', 'logged_in', 'logged_out', 'always', 'never') NOT NULL DEFAULT 'sip',
`permitUrlParameter` VARCHAR(255) NOT NULL DEFAULT '', `permitUrlParameter` VARCHAR(255) NOT NULL DEFAULT '',
`render` ENUM('plain', 'table', 'bootstrap') NOT NULL DEFAULT 'plain', `render` ENUM('plain', 'table', 'bootstrap') NOT NULL DEFAULT 'plain',
`multiMode` ENUM('none', 'horizontal', 'vertical') NOT NULL DEFAULT 'none', `multiMode` ENUM('none', 'horizontal', 'vertical') NOT NULL DEFAULT 'none',
`multiSql` TEXT NOT NULL, `multiSql` TEXT NOT NULL,
`multiDetailForm` VARCHAR(255) NOT NULL DEFAULT '', `multiDetailForm` VARCHAR(255) NOT NULL DEFAULT '',
...@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `Form` ( ...@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `Form` (
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no', `deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `name` (`name`), KEY `name` (`name`),
...@@ -51,46 +51,47 @@ DELIMITER ; ...@@ -51,46 +51,47 @@ DELIMITER ;
DROP TABLE IF EXISTS `FormElement`; DROP TABLE IF EXISTS `FormElement`;
CREATE TABLE IF NOT EXISTS `FormElement` ( CREATE TABLE IF NOT EXISTS `FormElement` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`formId` INT(11) NOT NULL, `formId` INT(11) NOT NULL,
`groupId` INT(11) NOT NULL DEFAULT '0', `feIdContainer` INT(11) NOT NULL DEFAULT '0',
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes', `enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '', `name` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '', `label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'readonly', 'required', 'lock', 'disabled') NOT NULL DEFAULT 'show', `mode` ENUM('show', 'readonly', 'required', 'lock', 'disabled') NOT NULL DEFAULT 'show',
`class` ENUM('native', 'action', 'fieldset', 'pill') NOT NULL DEFAULT 'native', `class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`type` ENUM('checkbox', 'dateJQW', 'datetimeJQW', 'email', 'gridJQW', 'hidden', 'input', `type` ENUM('checkbox', 'dateJQW', 'datetimeJQW', 'email', 'gridJQW', 'hidden', 'input',
'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
'before_load', 'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load', 'before_load', 'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load',
'after_save', 'after_insert', 'after_update', 'after_delete', 'group', 'after_save', 'after_insert', 'after_update', 'after_delete', 'feGroup',
'sendmail') NOT NULL DEFAULT 'input', 'sendmail') NOT NULL DEFAULT 'input',
`checkType` ENUM('', 'min|max', 'pattern', 'number', 'email'), `checkType` ENUM('', 'min|max', 'pattern', 'number', 'email'),
`checkPattern` VARCHAR(255) NOT NULL DEFAULT '', `checkPattern` VARCHAR(255) NOT NULL DEFAULT '',
`onChange` VARCHAR(255) NOT NULL DEFAULT '', `onChange` VARCHAR(255) NOT NULL DEFAULT '',
`ord` INT(11) NOT NULL DEFAULT '0', `ord` INT(11) NOT NULL DEFAULT '0',
`tabindex` INT(11) NOT NULL DEFAULT '0', `tabindex` INT(11) NOT NULL DEFAULT '0',
`size` VARCHAR(255) NOT NULL DEFAULT '', `size` VARCHAR(255) NOT NULL DEFAULT '',
`maxLength` VARCHAR(255) NOT NULL DEFAULT '', `maxLength` VARCHAR(255) NOT NULL DEFAULT '',
`note` TEXT NOT NULL, `note` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '', `tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(255) NOT NULL DEFAULT '', `placeholder` VARCHAR(255) NOT NULL DEFAULT '',
`clientJs` TEXT, `clientJs` TEXT,
`value` TEXT NOT NULL, `value` TEXT NOT NULL,
`sql1` TEXT NOT NULL, `sql1` TEXT NOT NULL,
`sql2` TEXT NOT NULL, `sql2` TEXT NOT NULL,
`parameter` TEXT NOT NULL, `parameter` TEXT NOT NULL,
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no', `feGroup` VARCHAR(255) NOT NULL DEFAULT '',
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `formId` (`formId`), KEY `formId` (`formId`),
...@@ -119,33 +120,35 @@ INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, r ...@@ -119,33 +120,35 @@ INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, r
'Form', 'always', 'always', 'table', ''); 'Form', 'always', 'always', 'table', '');
# FormEditor: FormElements # FormEditor: FormElements
INSERT INTO FormElement (formId, name, label, mode, type, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter) INSERT INTO FormElement (formId, name, label, mode, type, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter, feIdContainer)
VALUES VALUES
(1, 'id', 'id', 'readonly', 'input', 10, 10, 11, '', '', '', '', '', ''), (1, 'id', 'id', 'readonly', 'input', 10, 10, 11, '', '', '', '', '', '', 0),
(1, 'name', 'Name', 'show', 'input', 20, 40, 255, '', '', '', '', '', 'autofocus=on'), (1, 'name', 'Name', 'show', 'input', 20, 40, 255, '', '', '', '', '', 'autofocus=on', 0),
(1, 'title', 'Title', 'show', 'input', 30, 40, 255, '', '', '', '', '', ''), (1, 'title', 'Title', 'show', 'input', 30, 40, 255, '', '', '', '', '', '', 0),
(1, 'noteInternal', 'Note', 'show', 'input', 40, '40,3', 0, '', '', '', '', '', ''), (1, 'noteInternal', 'Note', 'show', 'input', 40, '40,3', 0, '', '', '', '', '', '', 0),
(1, 'tableName', 'Table', 'show', 'select', 50, 0, 0, '', '', '', '{{!SHOW tables}}', '', ''), (1, 'tableName', 'Table', 'show', 'select', 50, 0, 0, '', '', '', '{{!SHOW tables}}', '', '', 0),
(1, 'permitNew', 'Permit New', 'show', 'radio', 60, 0, 0, '', '', '', '', '', ''), (1, 'permitNew', 'Permit New', 'show', 'radio', 60, 0, 0, '', '', '', '', '', '', 0),
(1, 'permitEdit', 'Permit Edit', 'show', 'radio', 70, 0, 0, '', '', '', '', '', ''), (1, 'permitEdit', 'Permit Edit', 'show', 'radio', 70, 0, 0, '', '', '', '', '', '', 0),
(1, 'permitUrlParameter', 'Permit Url Parameter', 'show', 'input', 80, 40, 255, '', '', '', '', '', ''), (1, 'permitUrlParameter', 'Permit Url Parameter', 'show', 'input', 80, 40, 255, '', '', '', '', '', '', 0),
(1, 'render', 'Render', 'show', 'radio', 90, 0, 0, '', '', '', '', '', ''), (1, 'render', 'Render', 'show', 'radio', 90, 0, 0, '', '', '', '', '', '', 0),
(1, 'multiMode', 'Multi Mode', 'show', 'radio', 100, 0, 0, '', '', '', '', '', ''),
(1, 'multiSql', 'Multi SQL', 'show', 'input', 110, '40,3', 0, '', '', '', '', '', ''), (1, 'multi', 'Multi', 'show', 'fieldset', 100, 0, 0, '', '', '', '', '', '', 0),
(1, 'multiDetailForm', 'Multi Detail Form', 'show', 'input', 120, 40, 255, '', '', '', '', '', ''), (1, 'multiMode', 'Multi Mode', 'show', 'radio', 100, 0, 0, '', '', '', '', '', '', 10),
(1, 'multiDetailFormParameter', 'Multi Detail Form Parameter', 'show', 'input', 130, 40, 255, '', '', '', '', '', ''), (1, 'multiSql', 'Multi SQL', 'show', 'input', 110, '40,3', 0, '', '', '', '', '', '', 10),
(1, 'forwardMode', 'Forward', 'show', 'radio', 140, 0, 0, '', '', '', '', '', ''), (1, 'multiDetailForm', 'Multi Detail Form', 'show', 'input', 120, 40, 255, '', '', '', '', '', '', 10),
(1, 'forwardPage', 'Forward Page', 'show', 'input', 150, 40, 255, '', '', '', '', '', ''), (1, 'multiDetailFormParameter', 'Multi Detail Form Parameter', 'show', 'input', 130, 40, 255, '', '', '', '', '', '', 10),
(1, 'bsLabelColumns', 'BS Label Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', ''), (1, 'forwardMode', 'Forward', 'show', 'radio', 140, 0, 0, '', '', '', '', '', '', 0),
(1, 'bsInputColumns', 'BS Input Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', ''), (1, 'forwardPage', 'Forward Page', 'show', 'input', 150, 40, 255, '', '', '', '', '', '', 0),
(1, 'bsNoteColumns', 'BS Note Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', ''), (1, 'bsLabelColumns', 'BS Label Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', '', 0),
(1, 'bsInputColumns', 'BS Input Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', '', 0),
(1, 'deleted', 'Deleted', 'show', 'checkbox', 170, 0, 0, '', '', '', '', '', ''), (1, 'bsNoteColumns', 'BS Note Columns', 'show', 'input', 160, 40, 250, '', '', '', '', '', '', 0),
(1, 'modified', 'Modified', 'readonly', 'input', 180, 40, 20, '', '', '', '', '', ''),
(1, 'created', 'Created', 'readonly', 'input', 180, 40, 20, '', '', '', '', '', ''), (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}}', (1, '', 'FormElements', 'show', 'subrecord', 200, 0, 0, '', '', '', '{{!SELECT * FROM FormElement WHERE formId=1}}',
'', ''); '', '', 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