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

Formelement.mode='lock': removed, cause it seems that there is no difference...

Formelement.mode='lock': removed, cause it seems that there is no difference to 'readonly'. Inside the code, there is no difference
UserManual/Index.rst: doc updated
FillStoreForm.php, Save.php: same functionality like FE_MODE_READONLY - removed.
formEditor.sql: definition updated
parent cd0a4818
......@@ -498,10 +498,10 @@ Class: Native
+---------------+-----------------------------+---------------------------------------------------------------------------------------------------+
|label | string | Label of formelement. Depending on layout model, left or on top of the formelement |
+---------------+-----------------------------+---------------------------------------------------------------------------------------------------+
|mode | enum('show', 'readonly', | Default: show - *Show*: regular user input field. *Readonly* : user can't change any data. |
| | 'required', 'lock', | *Important* : user manipulated data won't be saved. *Required* User has to specify a value. |
| | 'disabled' ) | Typically, an <empty string> represents 'no value'. *Lock* form element is read only and grayed |
| | | out, *Disabled*: form element is not visible |
|mode | enum('show', 'readonly', | *Show*: regular user input field. This is the default. |
| | 'required', | *Required*: User has to specify a value. Typically, an <empty string> represents 'no value'. |
| | 'disabled' ) | *Readonly*: user can't change any data. Data not saved. |
| | | *Disabled*: form element is not visible. |
+---------------+-----------------------------+---------------------------------------------------------------------------------------------------+
|class | enum('native', 'action', | Details below. |
| | 'container') | |
......
......@@ -365,7 +365,6 @@ const GLYPH_ICON_CHECK = 'glyphicon glyphicon-ok';
const FE_MODE_SHOW = 'show';
const FE_MODE_READONLY = 'readonly';
const FE_MODE_REQUIRED = 'required';
const FE_MODE_LOCK = 'lock';
const FE_MODE_DISABLED = 'disabled';
const FE_SUBRECORD_ROW_CLASS = '_rowClass';
......
......@@ -97,6 +97,16 @@ class Save {
if ($formElement === false)
continue;
// Some modes means: do not save this column.
switch ($formElement[FE_MODE]) {
case FE_MODE_READONLY:
case FE_MODE_DISABLED:
continue 2; // 1 for switch, 2 for continue foreach.
default:
break;
}
// Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($formElement), STORE_SYSTEM);
......
......@@ -167,7 +167,6 @@ class FillStoreForm {
break;
case FE_MODE_READONLY:
case FE_MODE_LOCK:
case FE_MODE_DISABLED:
continue;
default:
......
......@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS `FormElement` (
`name` 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', 'required', 'readonly', 'disabled') NOT NULL DEFAULT 'show',
`class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native',
`type` ENUM('checkbox', 'date', 'datetime', 'dateJQW', 'datetimeJQW', 'gridJQW', 'hidden', 'text', 'time',
'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'fieldset', 'pill',
......@@ -81,9 +81,9 @@ CREATE TABLE IF NOT EXISTS `FormElement` (
`size` VARCHAR(255) NOT NULL DEFAULT '',
`maxLength` VARCHAR(255) NOT NULL DEFAULT '',
`bsLabelColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsInputColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsLabelColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsInputColumns` VARCHAR(255) NOT NULL DEFAULT '',
`bsNoteColumns` VARCHAR(255) NOT NULL DEFAULT '',
`note` TEXT NOT NULL,
`tooltip` VARCHAR(255) NOT NULL DEFAULT '',
`placeholder` VARCHAR(255) NOT NULL DEFAULT '',
......
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