Commit 26beab71 authored by Carsten  Rose's avatar Carsten Rose
Browse files

formEditor.sql: render mode now lowercase. Formelement.created missing. Formelement.type adjusted

parent a64d950e
......@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `Form` (
`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',
`permitUrlParameter` VARCHAR(255) NOT NULL DEFAULT '',
`render` ENUM('Plain', 'Bootstrap') NOT NULL DEFAULT 'Plain',
`render` ENUM('plain', 'table', 'bootstrap') NOT NULL DEFAULT 'plain',
`multiMode` ENUM('none', 'horizontal', 'vertical') NOT NULL DEFAULT 'none',
`multiSql` TEXT NOT NULL,
`multiDetailForm` VARCHAR(255) NOT NULL DEFAULT '',
......@@ -21,8 +21,11 @@ CREATE TABLE IF NOT EXISTS `Form` (
`bsLabelColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsInputColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsNoteColumns` 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 `name` (`name`),
KEY `name_deleted` (`name`, `deleted`)
......@@ -31,11 +34,6 @@ CREATE TABLE IF NOT EXISTS `Form` (
DEFAULT CHARSET = utf8
AUTO_INCREMENT = 0;
#
# Create Demo Form
INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, multiSql) VALUES
('form', 'Form Editor', 'Please secure the form', 'Form', 'always', 'always', '');
--
-- Triggers `Form`
--
......@@ -47,6 +45,13 @@ current_timestamp()
//
DELIMITER ;
#
# FormEditor
INSERT INTO Form (name, title, noteInternal, tableName, permitNew, permitEdit, multiSql) VALUES
('form', 'Form Editor: {{SELECT id, " / ", title FROM Form WHERE id = {{recordId:SZ}}}}', 'Please secure the form',
'Form', 'always', 'always', '');
# ----------------------------------------
# FormElement
......@@ -59,35 +64,33 @@ CREATE TABLE IF NOT EXISTS `FormElement` (
`enabled` ENUM('yes', 'no') NOT NULL DEFAULT 'yes',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`title` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`mode` ENUM('show', 'readonly', 'required', 'lock'),
`class` ENUM('native|action|group'),
`type` ENUM('button', 'checkbox', 'date', 'datetime', 'email', 'grid', 'hidden', 'input', 'label',
'multiselect', 'note', 'radio', 'select', 'textarea', 'time', 'upload', 'url', 'before_load',
'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load', 'after_save',
'after_insert', 'after_update', 'after_delete', 'group',
`mode` ENUM('show', 'readonly', 'required', 'lock', 'disabled') NOT NULL DEFAULT 'show',
`class` ENUM('native', 'action', 'group') NOT NULL DEFAULT 'native',
`type` ENUM('checkbox', 'dateJQW', 'datetimeJQW', 'email', 'gridJQW', 'hidden', 'input',
'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'url',
'before_load', 'before_save', 'before_insert', 'before_update', 'before_delete', 'after_load',
'after_save', 'after_insert', 'after_update', 'after_delete', 'group',
'sendmail') NOT NULL DEFAULT 'input',
`checkType` ENUM('min|max', 'pattern', 'number', 'email', 'url'),
`checkType` ENUM('', 'min|max', 'pattern', 'number', 'email'),
`checkPattern` VARCHAR(255) NOT NULL DEFAULT '',
`onChange` VARCHAR(255) NOT NULL DEFAULT '',
`order` INT(11) NOT NULL DEFAULT '0',
`ord` INT(11) NOT NULL DEFAULT '0',
`tabindex` INT(11) NOT NULL DEFAULT '0',
`autofocus` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
`size` VARCHAR(255) NOT NULL DEFAULT '',
`maxLength` VARCHAR(255) NOT NULL DEFAULT '',
`label` VARCHAR(255) NOT NULL DEFAULT '',
`note` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(255) NOT NULL DEFAULT '',
`clientJs` TEXT,
`value` TEXT NOT NULL,
`sql` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`sql2` TEXT NOT NULL,
`parameter` TEXT NOT NULL,
......@@ -114,3 +117,11 @@ current_timestamp()
//
DELIMITER ;
# FormEditor: FormElements
INSERT INTO FormElement (formId, name, label, mode, type, ord, size, maxLength, note, clientJs, value, sql1, sql2, parameter)
VALUES
(1, 'id', 'id', 'readonly', 'input', 10, 30, 10, '', '', '', '', '', ''),
(1, 'name', 'Name', 'show', 'input', 20, 20, 10, '', '', '', '', '', 'autofocus=on'),
(1, 'label', 'Label', 'show', 'input', 20, 10, 10, '', '', '', '', '', '');
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