Commit 97be03dc authored by Carsten  Rose's avatar Carsten Rose

Merge branch 'unifyParameterFormModeGlobal' into 'develop'

Unify parameter form mode global

See merge request !237
parents 6c1e1d49 fdecb11c
Pipeline #3118 passed with stages
in 1 minute and 49 seconds
...@@ -36,10 +36,37 @@ Features ...@@ -36,10 +36,37 @@ Features
Bug Fixes Bug Fixes
^^^^^^^^^ ^^^^^^^^^
Date: 09.01.2020
Notes
^^^^^
* Deprecated: Form.parameter.mode. Use Form.parameter.formModeGlobal
Features
^^^^^^^^
* #9805 / Form.parameter.activateFirstRequiredTab.
* #9858 / Form.parameter: replace 'mode' by 'formModeGlobal'
* #9860 / SQL function qmore(): change text '...' to '[...]'.
* Update Developer doc for record locking.
* Mockup for error handling.
Bug Fixes
^^^^^^^^^
* #7925 / Error in split PDF file during upload. Fix the cwd error in Logger.
* #9789 / Record lock release to early on 'leave page'. QfqJS: Moved release lock to before unload.
* #9861 / Fix problem with broken sql.log filename.
* #8851 / Revert implementation: LogMode 'modify' vs. 'modifyAll'.
* #9859 / Database Update: check for 'Update specialColumnName needed' breaks new QFQ install.
* #9813 / During QFQ database update, skip errors like 'Error 1060 - Duplicate Column'.
* Manual.rst: Fix various broken table layouts.
Version 19.12.0 Version 19.12.0
--------------- ---------------
Date: <date> Date: 17.12.2019
Notes Notes
^^^^^ ^^^^^
...@@ -72,7 +99,6 @@ Bug Fixes ...@@ -72,7 +99,6 @@ Bug Fixes
* #7974 / TinyMCE: ReadOnly. * #7974 / TinyMCE: ReadOnly.
* #9424 / modeSql: skip if it starts with '#'. * #9424 / modeSql: skip if it starts with '#'.
* #9531 / File Upload Required.
* #9674 / Select Required Dynamic Update. * #9674 / Select Required Dynamic Update.
* #9678 / textarea now trigger DynamicUpdate. * #9678 / textarea now trigger DynamicUpdate.
* #9679 / FormModeGlobal: add STORE_USER - system wide readonly. * #9679 / FormModeGlobal: add STORE_USER - system wide readonly.
...@@ -83,6 +109,7 @@ Bug Fixes ...@@ -83,6 +109,7 @@ Bug Fixes
* #9733 / Identiy different tabs. Record lock for same tab will always be granted. * #9733 / Identiy different tabs. Record lock for same tab will always be granted.
* #9734 / Fix 'dirty lock release' - leaving a dirty form without closing, leaves a stale lock record. Added a releaselock() before window.unload. Dirty remove on goBack. * #9734 / Fix 'dirty lock release' - leaving a dirty form without closing, leaves a stale lock record. Added a releaselock() before window.unload. Dirty remove on goBack.
* #9735 / File Delete: no dirty trigger. * #9735 / File Delete: no dirty trigger.
* Download / PDF merge: skip leading errors, interpret only 'Could not merge encrypted files'. * Download / PDF merge: skip leading errors, interpret only 'Could not merge encrypted files'.
* DragAndDrop broken: after refactoring Support.php, the dragAndDrop was broken - missed init of '$store'. * DragAndDrop broken: after refactoring Support.php, the dragAndDrop was broken - missed init of '$store'.
......
...@@ -15,11 +15,16 @@ Neue Versionsnummer ...@@ -15,11 +15,16 @@ Neue Versionsnummer
2) Die aktuellen Commits anschauen und wichtige Topics uebernehmen (git log > ~/qfq.log, alles bis zum letzten TAG anschauen): 2) Die aktuellen Commits anschauen und wichtige Topics uebernehmen (git log > ~/qfq.log, alles bis zum letzten TAG anschauen):
# complicated: git log | grep -v -e '^commit ' -e '^Author: ' -e '^Date: ' -e '^Merge: ' > /tmp/out; pluma /tmp/out
# Zeigt **alle Commits** an, die seit dem aendern von NewVersion gemacht wurden! Das sollten alle Commits seit der letzten Version sein.
* git log --pretty=%s --after="`stat -c %y doc/NewVersion.md`"
* **All commits since last tag**:
git log $(git describe --tags --abbrev=0)..HEAD --oneline | cut -c9- > /tmp/out; pluma /tmp/out
* All commits since tag 'v19.12.0'
git log v19.12.0..HEAD --oneline
* complicated:
git log | grep -v -e '^commit ' -e '^Author: ' -e '^Date: ' -e '^Merge: ' > /tmp/out; pluma /tmp/out
* **Anpassen**: qfq/extension/Documentation/Release.rst * **Anpassen**: qfq/extension/Documentation/Release.rst
* Release.rst **verteilen**: make copyReleaseNotes * Release.rst **verteilen**: make copyReleaseNotes
...@@ -54,12 +59,12 @@ Neue Versionsnummer ...@@ -54,12 +59,12 @@ Neue Versionsnummer
* Update the version number in this document (topic 6) * Update the version number in this document (topic 6)
* Commit & Push new version changes to master branch: * Commit & Push new version changes to master branch:
New version 19.12.0 New version 20.1.0
6) **New Tag**: 6) **New Tag**:
git tag v19.12.0 git tag v20.1.0
git push -u origin v19.12.0 git push -u origin v20.1.0
7) Tickets: 7) Tickets:
* Schliessen und der QFQ Version zuweisen. * Schliessen und der QFQ Version zuweisen.
......
...@@ -36,6 +36,33 @@ Features ...@@ -36,6 +36,33 @@ Features
Bug Fixes Bug Fixes
^^^^^^^^^ ^^^^^^^^^
Date: 09.01.2020
Notes
^^^^^
* Deprecated: Form.parameter.mode. Use Form.parameter.formModeGlobal
Features
^^^^^^^^
* #9805 / Form.parameter.activateFirstRequiredTab.
* #9858 / Form.parameter: replace 'mode' by 'formModeGlobal'
* #9860 / SQL function qmore(): change text '...' to '[...]'.
* Update Developer doc for record locking.
* Mockup for error handling.
Bug Fixes
^^^^^^^^^
* #7925 / Error in split PDF file during upload. Fix the cwd error in Logger.
* #9789 / Record lock release to early on 'leave page'. QfqJS: Moved release lock to before unload.
* #9861 / Fix problem with broken sql.log filename.
* #8851 / Revert implementation: LogMode 'modify' vs. 'modifyAll'.
* #9859 / Database Update: check for 'Update specialColumnName needed' breaks new QFQ install.
* #9813 / During QFQ database update, skip errors like 'Error 1060 - Duplicate Column'.
* Manual.rst: Fix various broken table layouts.
Version 19.12.0 Version 19.12.0
--------------- ---------------
...@@ -72,7 +99,6 @@ Bug Fixes ...@@ -72,7 +99,6 @@ Bug Fixes
* #7974 / TinyMCE: ReadOnly. * #7974 / TinyMCE: ReadOnly.
* #9424 / modeSql: skip if it starts with '#'. * #9424 / modeSql: skip if it starts with '#'.
* #9531 / File Upload Required.
* #9674 / Select Required Dynamic Update. * #9674 / Select Required Dynamic Update.
* #9678 / textarea now trigger DynamicUpdate. * #9678 / textarea now trigger DynamicUpdate.
* #9679 / FormModeGlobal: add STORE_USER - system wide readonly. * #9679 / FormModeGlobal: add STORE_USER - system wide readonly.
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
; you can use in 'conf.py' ; you can use in 'conf.py'
project = QFQ - Quick Form Query project = QFQ - Quick Form Query
version = 19.12 version = 20.1
release = 19.12.0 release = 20.1.0
t3author = Carsten Rose t3author = Carsten Rose
copyright = since 2017 by the author copyright = since 2017 by the author
......
...@@ -2302,8 +2302,8 @@ abstract class AbstractBuildForm { ...@@ -2302,8 +2302,8 @@ abstract class AbstractBuildForm {
]; ];
// Inherit current F_MODE // Inherit current F_MODE
if ($this->formSpec[F_MODE] != '') { if ($this->formSpec[F_MODE_GLOBAL] != '') {
$queryStringArray[F_MODE_GLOBAL] = $this->formSpec[F_MODE]; $queryStringArray[F_MODE_GLOBAL] = $this->formSpec[F_MODE_GLOBAL];
} }
// In case the subrecord FE is set to 'readonly': subforms will be called with formModeGlobal=readonly // In case the subrecord FE is set to 'readonly': subforms will be called with formModeGlobal=readonly
......
...@@ -586,6 +586,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -586,6 +586,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @throws \CodeException * @throws \CodeException
* @throws \DbException * @throws \DbException
* @throws \UserFormException * @throws \UserFormException
* @throws \UserReportException
*/ */
public function getFormTag() { public function getFormTag() {
......
...@@ -1010,7 +1010,6 @@ const F_TYPEAHEAD_LDAP_SEARCH = 'typeAheadLdapSearch'; ...@@ -1010,7 +1010,6 @@ const F_TYPEAHEAD_LDAP_SEARCH = 'typeAheadLdapSearch';
const F_TYPEAHEAD_LDAP_SEARCH_PREFETCH = 'typeAheadLdapSearchPrefetch'; const F_TYPEAHEAD_LDAP_SEARCH_PREFETCH = 'typeAheadLdapSearchPrefetch';
const F_TYPEAHEAD_LDAP_SEARCH_PER_TOKEN = 'typeAheadLdapSearchPerToken'; const F_TYPEAHEAD_LDAP_SEARCH_PER_TOKEN = 'typeAheadLdapSearchPerToken';
const F_MODE = 'mode';
const F_MODE_READONLY = 'readonly'; const F_MODE_READONLY = 'readonly';
const F_MODE_REQUIRED_OFF = 'requiredOff'; const F_MODE_REQUIRED_OFF = 'requiredOff';
const F_MODE_REQUIRED_OFF_BUT_MARK = 'requiredOffButMark'; const F_MODE_REQUIRED_OFF_BUT_MARK = 'requiredOffButMark';
......
...@@ -855,8 +855,8 @@ class Support { ...@@ -855,8 +855,8 @@ class Support {
$formElement[FE_MODE] = $formElement[FE_MODE_SQL]; $formElement[FE_MODE] = $formElement[FE_MODE_SQL];
} }
if (isset($formSpec[F_MODE])) { if (isset($formSpec[F_MODE_GLOBAL])) {
$formElement[FE_MODE] = self::applyFormModeToFormElement($formElement[FE_MODE], $formSpec[F_MODE]); $formElement[FE_MODE] = self::applyFormModeToFormElement($formElement[FE_MODE], $formSpec[F_MODE_GLOBAL]);
} }
// set typeAheadPedantic // set typeAheadPedantic
......
...@@ -448,7 +448,7 @@ class QuickFormQuery { ...@@ -448,7 +448,7 @@ class QuickFormQuery {
$recordDirty = array(); $recordDirty = array();
$rcLockFound = $dirty->getCheckDirty($this->formSpec[F_TABLE_NAME], $recordId, $recordDirty, $msg); $rcLockFound = $dirty->getCheckDirty($this->formSpec[F_TABLE_NAME], $recordId, $recordDirty, $msg);
if (($rcLockFound == LOCK_FOUND_CONFLICT || $rcLockFound == LOCK_FOUND_OWNER) && $recordDirty[F_DIRTY_MODE] == DIRTY_MODE_EXCLUSIVE) { if (($rcLockFound == LOCK_FOUND_CONFLICT || $rcLockFound == LOCK_FOUND_OWNER) && $recordDirty[F_DIRTY_MODE] == DIRTY_MODE_EXCLUSIVE) {
$this->formSpec[F_MODE] = F_MODE_READONLY; $this->formSpec[F_MODE_GLOBAL] = F_MODE_READONLY;
} }
} }
...@@ -1435,7 +1435,6 @@ class QuickFormQuery { ...@@ -1435,7 +1435,6 @@ class QuickFormQuery {
Support::setIfNotSet($formSpec, F_SUBMIT_BUTTON_TEXT, ''); Support::setIfNotSet($formSpec, F_SUBMIT_BUTTON_TEXT, '');
Support::setIfNotSet($formSpec, F_BUTTON_ON_CHANGE_CLASS, ''); Support::setIfNotSet($formSpec, F_BUTTON_ON_CHANGE_CLASS, '');
Support::setIfNotSet($formSpec, F_LDAP_USE_BIND_CREDENTIALS, ''); Support::setIfNotSet($formSpec, F_LDAP_USE_BIND_CREDENTIALS, '');
Support::setIfNotSet($formSpec, F_MODE, '');
Support::setIfNotSet($formSpec, F_DB_INDEX, $this->store->getVar(F_DB_INDEX, STORE_SYSTEM)); Support::setIfNotSet($formSpec, F_DB_INDEX, $this->store->getVar(F_DB_INDEX, STORE_SYSTEM));
Support::setIfNotSet($formSpec, F_ENTER_AS_SUBMIT, $this->store->getVar(SYSTEM_ENTER_AS_SUBMIT, STORE_SYSTEM)); Support::setIfNotSet($formSpec, F_ENTER_AS_SUBMIT, $this->store->getVar(SYSTEM_ENTER_AS_SUBMIT, STORE_SYSTEM));
Support::setIfNotSet($formSpec, F_SESSION_TIMEOUT_SECONDS, $this->store->getVar(SYSTEM_SESSION_TIMEOUT_SECONDS, STORE_SYSTEM)); Support::setIfNotSet($formSpec, F_SESSION_TIMEOUT_SECONDS, $this->store->getVar(SYSTEM_SESSION_TIMEOUT_SECONDS, STORE_SYSTEM));
...@@ -1453,10 +1452,18 @@ class QuickFormQuery { ...@@ -1453,10 +1452,18 @@ class QuickFormQuery {
// } // }
// } // }
// //
$formSpec[F_MODE] = Support::getFormModeGlobal($formSpec[F_MODE]); // Check for deprecated legacy code
if (isset($formSpec['mode'])) {
throw new \UserFormException(json_encode([ERROR_MESSAGE_TO_USER => 'Outdated form definition',
ERROR_MESSAGE_TO_DEVELOPER => "form.parameter.mode is deprecated. Please use form.parameter.formModeGlobal instead."
]));
}
// Unify F_MODE_GLOBAL
$formSpec[F_MODE_GLOBAL] = Support::getFormModeGlobal($formSpec[F_MODE_GLOBAL] ?? '');
if ($formSpec[F_MODE] == F_MODE_READONLY) { if ($formSpec[F_MODE_GLOBAL] == F_MODE_READONLY) {
$formSpec[F_SHOW_BUTTON] = FORM_BUTTON_CLOSE; $formSpec[F_SHOW_BUTTON] = FORM_BUTTON_CLOSE;
$formSpec[F_SUBMIT_BUTTON_TEXT] = ''; $formSpec[F_SUBMIT_BUTTON_TEXT] = '';
} }
......
...@@ -235,7 +235,7 @@ class FillStoreForm { ...@@ -235,7 +235,7 @@ class FillStoreForm {
$clientFieldName = ($formMode == FORM_REST) ? $formElement[FE_NAME] : HelperFormElement::buildFormElementName($formElement, $fakeRecordId); $clientFieldName = ($formMode == FORM_REST) ? $formElement[FE_NAME] : HelperFormElement::buildFormElementName($formElement, $fakeRecordId);
// Some Defaults // Some Defaults
$formElement = Support::setFeDefaults($formElement, [F_MODE => $formModeGlobal]); $formElement = Support::setFeDefaults($formElement, [FE_MODE => $formModeGlobal]);
if ($formElement[FE_TYPE] === FE_TYPE_EXTRA) { if ($formElement[FE_TYPE] === FE_TYPE_EXTRA) {
// Extra elements will be transferred by SIP // Extra elements will be transferred by SIP
......
...@@ -36,10 +36,37 @@ Features ...@@ -36,10 +36,37 @@ Features
Bug Fixes Bug Fixes
^^^^^^^^^ ^^^^^^^^^
Date: 09.01.2020
Notes
^^^^^
* Deprecated: Form.parameter.mode. Use Form.parameter.formModeGlobal
Features
^^^^^^^^
* #9805 / Form.parameter.activateFirstRequiredTab.
* #9858 / Form.parameter: replace 'mode' by 'formModeGlobal'
* #9860 / SQL function qmore(): change text '...' to '[...]'.
* Update Developer doc for record locking.
* Mockup for error handling.
Bug Fixes
^^^^^^^^^
* #7925 / Error in split PDF file during upload. Fix the cwd error in Logger.
* #9789 / Record lock release to early on 'leave page'. QfqJS: Moved release lock to before unload.
* #9861 / Fix problem with broken sql.log filename.
* #8851 / Revert implementation: LogMode 'modify' vs. 'modifyAll'.
* #9859 / Database Update: check for 'Update specialColumnName needed' breaks new QFQ install.
* #9813 / During QFQ database update, skip errors like 'Error 1060 - Duplicate Column'.
* Manual.rst: Fix various broken table layouts.
Version 19.12.0 Version 19.12.0
--------------- ---------------
Date: <date> Date: 17.12.2019
Notes Notes
^^^^^ ^^^^^
...@@ -72,7 +99,6 @@ Bug Fixes ...@@ -72,7 +99,6 @@ Bug Fixes
* #7974 / TinyMCE: ReadOnly. * #7974 / TinyMCE: ReadOnly.
* #9424 / modeSql: skip if it starts with '#'. * #9424 / modeSql: skip if it starts with '#'.
* #9531 / File Upload Required.
* #9674 / Select Required Dynamic Update. * #9674 / Select Required Dynamic Update.
* #9678 / textarea now trigger DynamicUpdate. * #9678 / textarea now trigger DynamicUpdate.
* #9679 / FormModeGlobal: add STORE_USER - system wide readonly. * #9679 / FormModeGlobal: add STORE_USER - system wide readonly.
...@@ -83,6 +109,7 @@ Bug Fixes ...@@ -83,6 +109,7 @@ Bug Fixes
* #9733 / Identiy different tabs. Record lock for same tab will always be granted. * #9733 / Identiy different tabs. Record lock for same tab will always be granted.
* #9734 / Fix 'dirty lock release' - leaving a dirty form without closing, leaves a stale lock record. Added a releaselock() before window.unload. Dirty remove on goBack. * #9734 / Fix 'dirty lock release' - leaving a dirty form without closing, leaves a stale lock record. Added a releaselock() before window.unload. Dirty remove on goBack.
* #9735 / File Delete: no dirty trigger. * #9735 / File Delete: no dirty trigger.
* Download / PDF merge: skip leading errors, interpret only 'Could not merge encrypted files'. * Download / PDF merge: skip leading errors, interpret only 'Could not merge encrypted files'.
* DragAndDrop broken: after refactoring Support.php, the dragAndDrop was broken - missed init of '$store'. * DragAndDrop broken: after refactoring Support.php, the dragAndDrop was broken - missed init of '$store'.
......
...@@ -12,7 +12,7 @@ $EM_CONF[$_EXTKEY] = array( ...@@ -12,7 +12,7 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase', 'dependencies' => 'fluid,extbase',
'clearcacheonload' => true, 'clearcacheonload' => true,
'state' => 'stable', 'state' => 'stable',
'version' => '19.12.0', 'version' => '20.1.0',
'constraints' => [ 'constraints' => [
'depends' => [ 'depends' => [
'typo3' => '7.0.0-9.2.99', 'typo3' => '7.0.0-9.2.99',
......
Markdown is supported
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