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

Preparation Multi Language

parent 0c3afcee
......@@ -59,6 +59,19 @@ $UPDATE_ARRAY = array(
"CREATE TABLE IF NOT EXISTS `Period` (`id` INT(11) NOT NULL AUTO_INCREMENT, `start` DATETIME NOT NULL, `name` VARCHAR(255) NOT NULL, `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created` DATETIME NOT NULL, PRIMARY KEY (`id`), KEY `start` (`start`)) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 0;",
"INSERT INTO Period (start, name, created) VALUES (NOW(), 'dummy', NOW());"
],
'0.19.4' => [
"ALTER TABLE `Form` ADD `parameterL1` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `Form` ADD `parameterL2` TEXT NOT NULL AFTER `parameterL1`",
"ALTER TABLE `Form` ADD `parameterL3` TEXT NOT NULL AFTER `parameterL2`",
"ALTER TABLE `Form` ADD `parameterL4` TEXT NOT NULL AFTER `parameterL3`",
"ALTER TABLE `FormElement` ADD `parameterL1` TEXT NOT NULL AFTER `parameter`",
"ALTER TABLE `FormElement` ADD `parameterL2` TEXT NOT NULL AFTER `parameterL1`",
"ALTER TABLE `FormElement` ADD `parameterL3` TEXT NOT NULL AFTER `parameterL2`",
"ALTER TABLE `FormElement` ADD `parameterL4` TEXT NOT NULL AFTER `parameterL3`"
],
);
......
......@@ -27,6 +27,9 @@ CREATE TABLE IF NOT EXISTS `Form` (
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`parameter` TEXT NOT NULL,
`parameterL1` TEXT NOT NULL,
`parameterL2` TEXT NOT NULL,
`parameterL3` TEXT NOT NULL,
`recordLockTimeoutSeconds` INT(11) NOT NULL DEFAULT 900,
`deleted` ENUM('yes', 'no') NOT NULL DEFAULT 'no',
......@@ -39,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `Form` (
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8
AUTO_INCREMENT = 0;
AUTO_INCREMENT = 1000;
#--
......@@ -100,6 +103,9 @@ CREATE TABLE IF NOT EXISTS `FormElement` (
`value` TEXT NOT NULL,
`sql1` TEXT NOT NULL,
`parameter` TEXT NOT NULL,
`parameterL1` TEXT NOT NULL,
`parameterL2` TEXT NOT NULL,
`parameterL3` TEXT NOT NULL,
`clientJs` TEXT NOT NULL,
`feGroup` VARCHAR(255) NOT NULL DEFAULT '',
......@@ -170,11 +176,11 @@ CREATE TABLE IF NOT EXISTS `Period` (
# Delete previous FormElements (if exist)
DELETE FormElement FROM FormElement, Form
WHERE
(Form.name LIKE 'form' OR Form.name LIKE 'formElement' OR Form.name LIKE 'copyForm') AND Form.id = FormElement.formId;
FIND_IN_SET(Form.name, 'form,formElement,copyForm,cron') > 0 AND Form.id = FormElement.formId;
# Delete previous Forms (if exist)
DELETE FROM Form
WHERE name LIKE 'form' OR name LIKE 'formElement' OR name LIKE 'copyForm';
WHERE name LIKE 'form' OR name LIKE 'formElement' OR name LIKE 'copyForm' OR name LIKE 'cron';
#
# FormEditor: Form
......@@ -199,9 +205,8 @@ VALUES
# Make the form a 'delete form' for records Form/FormElement.
(1, 'Delete FE', '', 'show', 'beforeDelete', 'all', 'action', 100, 0, 0, '', '', '', '',
'sqlAfter={{DELETE FROM FormElement WHERE formId={{id:R}} }}', 0, '', '', '', 'none', 'no', ''),
(1, 'name', 'Name', 'required', 'text', 'pattern', 'native', 120, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-name">Info</a>', '', '', '', 'autofocus', 1, '', '', '',
'specialchar', 'no', '[a-zA-Z0-9._+-]+'),
(1, 'name', 'Name', 'required', 'text', 'pattern', 'native', 120, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-name">Info</a>', '', '', '', 'autofocus',
1, '', '', '', 'specialchar', 'no', '[a-zA-Z0-9._+-]+'),
(1, 'title', 'Title', 'show', 'text', 'all', 'native', 130, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-title">Info</a>', '', '', '', '', 1, '', '', '', 'none', 'no', ''),
(1, 'noteInternal', 'Note', 'show', 'text', 'all', 'native', 140, '40,3', 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-note">Info</a>', '', '', '', '', 1, '', '', '', 'specialchar', 'no', ''),
(1, 'tableName', 'Table', 'required', 'select', 'all', 'native', 150, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#form-tablename">Info</a>', '', '', '{{!SHOW tables}}',
......@@ -277,8 +282,9 @@ VALUES
(2, 'enabled', 'Enabled', 'show', 'checkbox', 'all', 'native', 130, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '', '', 'specialchar'),
(2, 'dynamicUpdate', 'Dynamic Update', 'show', 'checkbox', 'all', 'native', 135, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#dynamic-update">Info</a>',
'', '', '', '', 100, '', 'no', '', '', '', '', '', 'specialchar'),
(2, 'name', 'Name', 'show', 'text', 'all', 'native', 140, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', '', '', '', '', 100,
'<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', 'no', '', '', '', '', '', 'specialchar'),
(2, 'name', 'Name', 'show', 'text', 'all', 'native', 140, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', '', '', '',
'typeAheadSql = SELECT COLUMN_NAME FROM information_schema.columns WHERE table_schema = "{{DB_NAME:Y}}" AND table_name = "{{SELECT f.tableName FROM Form AS f WHERE f.id={{formId:S0}}}}" AND COLUMN_NAME LIKE ? ORDER BY COLUMN_NAME\ntypeAheadMinLength = 1\ntypeAheadLimit = 100\n',
100, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', 'no', '', '', '', '', '', 'specialchar'),
(2, 'label', 'Label', 'show', 'text', 'all', 'native', 150, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '', '', 'none'),
(2, 'mode', 'Mode', 'show', 'radio', 'all', 'native', 160, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">Info</a>', '', '', '', 'buttonClass=btn-default', 100, '', 'no', '', '', '', '', '', 'specialchar'),
(2, 'modeSql', 'Mode sql', 'show', 'text', 'all', 'native', 170, '70,2', 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#dynamic-update">Info</a>', '', '', '', '', 100, '', 'no', '', '', '', '', '', 'none'),
......@@ -405,3 +411,53 @@ VALUES
# Default record for table Period
INSERT INTO Period (start, name, created) VALUES (NOW(), 'dummy', NOW());
# AutoCRON
CREATE TABLE IF NOT EXISTS `Cron` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`grId` INT(11) NOT NULL,
`type` ENUM('mail', 'website') NOT NULL DEFAULT 'website',
`lastRun` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`lastStatus` TEXT NOT NULL,
`nextRun` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`frequency` VARCHAR(32) NOT NULL,
`inProgress` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`status` ENUM('enable', 'disable') NOT NULL DEFAULT 'enable',
`sql1` TEXT NOT NULL,
`content` TEXT NOT NULL,
`comment` TEXT NOT NULL,
`modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
AUTO_INCREMENT = 0
DEFAULT CHARSET = utf8;
# Form: Cron
INSERT INTO Form (id, name, title, tableName, parameter)
VALUES
(4, 'cron', 'cron {{SELECT IF("{{r}}" = "0", "(new)", "(Id: {{r}})") }}', 'Cron', '');
# FormElements: CopyForm
INSERT INTO FormElement (formId, name, label, mode, modeSql, type, encode, checkType, ord, parameter, size, note)
VALUES
(4, 'status', 'Enabled', 'show', '', 'checkbox', 'specialchar', 'alnumx', 10, '', '', ''),
(4, 'type', 'Type', 'show', '', 'radio', 'specialchar', 'alnumx', 20, 'buttonClass=btn-default', '', ''),
(4, 'nextRun', 'Next run', 'show', '', 'text', 'specialchar', 'alnumx', 30, '', '',
'<p>Cronjob will be started if specified timestamp is over. If timestamp=0: Job will never be started</p>\r\n<p>Every time the jobs runs, this timestamp will be increased automatically by&nbsp;''frequency`.</p>'),
(4, 'frequency', 'Frequency', 'show', '', 'text', 'specialchar', 'alnumx', 40, '', '',
'<p>Repeat AutoCron-job with the specified interval. If empty: no repeating.</p>\r\n<p>E.g.: "1 DAY", "15 MINUTE'', "6 MONTH" - used directly in SQL-Function "DATE_ADD(&lt;nextrun&gt;, INTERVAL &lt;frequency&gt;)"&nbsp;</p>'),
(4, 'comment', 'Comment', 'show', '', 'text', 'specialchar', 'allbut', 50, '', '',
'<p>Name/Description of cronjob</p>'),
(4, 'sql1', 'Mail', 'show', '', 'text', 'none', 'all', 60, '', '60,4',
'Query: &#123;&#123;!SELECT ... as sendMailTo...&#125;&#125;<br><b>sendMailTo / sendMailCc / sendMailBcc</b>: Separate multiple by comma.<br><b>sendMailFrom</b><br><b>sendMailSubject</b><br><b>sendMailReplyTo</b>: Optional<br><b>sendMailFlagAutoSubmit</b>: Optional. on|off. Default on - if "on", suppresses OoO answers from receivers.<br><b>sendMailGrId</b>: Optional<br><b>sendMailXId</b>: Optional'),
(4, 'content', 'Content', 'show', '', 'text', 'none', 'all', 70, '', '40,4',
'<p>Website: URL<br>Mail: Static Body or &#123;{SELECT ...&#125;}</p>'),
(4, 'lastRun', 'Last run', 'readonly', '', 'text', 'specialchar', 'alnumx', 80, '', '', ''),
(4, 'lastStatus', 'Laststatus', 'readonly', '', 'text', 'specialchar', 'alnumx', 90, '', '', ''),
(4, 'inProgress', 'Running', 'show', '', 'text', 'specialchar', 'alnumx', 100, '', '',
'<p>Starttime of running job. When job is finished, will be set back to 0. A new job will only be started, if this is 0.</p>\r\n<p>&nbsp;</p>');
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