diff --git a/extension/Documentation/UsersManual/Index.rst b/extension/Documentation/UsersManual/Index.rst index ee932088c7bada5fcdf8c8be2b2e3501c559891a..6e8d5871fb284d41c9b9a3ccb1392411e68467ce 100644 --- a/extension/Documentation/UsersManual/Index.rst +++ b/extension/Documentation/UsersManual/Index.rst @@ -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') | | diff --git a/extension/qfq/qfq/Constants.php b/extension/qfq/qfq/Constants.php index 84f3562ff375e68b32f67154f9794d0534f92570..c5eb3e0ba27d5ee5c97a7a9faaff0518a3674327 100644 --- a/extension/qfq/qfq/Constants.php +++ b/extension/qfq/qfq/Constants.php @@ -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'; diff --git a/extension/qfq/qfq/Save.php b/extension/qfq/qfq/Save.php index 33b7fc3c56092dbd0cfc41f8ddab2341bec517cc..d2bcbb5f3c257d429b6ae6d9cc179d7af800ccaf 100644 --- a/extension/qfq/qfq/Save.php +++ b/extension/qfq/qfq/Save.php @@ -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); diff --git a/extension/qfq/qfq/store/FillStoreForm.php b/extension/qfq/qfq/store/FillStoreForm.php index 5c8ee5e70c1ed11a3cb6ab728181979534a9d983..72f3f70927e60ae06f48497b118f5b3da796e659 100644 --- a/extension/qfq/qfq/store/FillStoreForm.php +++ b/extension/qfq/qfq/store/FillStoreForm.php @@ -167,7 +167,6 @@ class FillStoreForm { break; case FE_MODE_READONLY: - case FE_MODE_LOCK: case FE_MODE_DISABLED: continue; default: diff --git a/extension/qfq/sql/formEditor.sql b/extension/qfq/sql/formEditor.sql index ed94c35ed2e6a282c9604f39a1f1fb8feef4bccd..d796a85b5e19737002065876f22f014dcb79f737 100644 --- a/extension/qfq/sql/formEditor.sql +++ b/extension/qfq/sql/formEditor.sql @@ -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 '',