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

Bug #4731 / Dynamic Update: load(post) triggers 'check required' - makes no...

Bug #4731 / Dynamic Update: load(post) triggers 'check required' - makes no sense during filling a form - fixed
parent 20ed59f8
......@@ -253,7 +253,7 @@ class QuickFormQuery {
// Fill STORE_FORM
if ($formMode === FORM_UPDATE || $formMode === FORM_SAVE) {
$fillStoreForm = new FillStoreForm();
$fillStoreForm->process();
$fillStoreForm->process($formMode);
}
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT . STORE_ZERO);
......
......@@ -127,10 +127,13 @@ class FillStoreForm {
* Copies all current form parameter from STORE_CLIENT to STORE_FORM. Checks the values against FormElement
* definition and throws an exception if check fails. FormElements.type=hidden will be taken from STORE_SIP.
*
* @param string $formMode
*
* @throws CodeException
* @throws UserFormException
*/
public function process() {
public function process($formMode = FORM_SAVE) {
// The following will never be used during load (fe.type='upload').
$skip = [FE_SQL_UPDATE, FE_SQL_INSERT, FE_SQL_DELETE, FE_SQL_AFTER, FE_SQL_BEFORE, FE_PARAMETER];
......@@ -140,6 +143,10 @@ class FillStoreForm {
$clientValues = $this->store->getStore(STORE_CLIENT);
$formModeGlobal = $this->store->getVar(F_MODE_GLOBAL, STORE_SIP . STORE_EMPTY);
if ($formMode == FORM_UPDATE && $formModeGlobal == '') {
$formModeGlobal = F_MODE_REQUIRED_OFF;
}
// If called through 'api/...': get STORE_TYPO3 via SIP parameter.
if (isset($clientValues[CLIENT_TYPO3VARS])) {
$this->store->fillTypo3StoreFromSip($clientValues[CLIENT_TYPO3VARS]);
......
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