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

F6991 / Optional process 'readonly' FE during save. New FE parameter...

F6991 / Optional process 'readonly' FE during save. New FE parameter 'processReadOnly = 0|1'. refs #6991. Fixes #6991.
parent 8203e8f7
Pipeline #996 passed with stage
in 1 minute and 34 seconds
This diff is collapsed.
......@@ -1091,6 +1091,7 @@ const FE_FILE_BUTTON_TEXT_DEFAULT = 'Choose File';
const FE_INPUT_TYPE = 'inputType';
const FE_STEP = 'step';
const FE_ACCEPT_ZERO_AS_REQUIRED = 'acceptZeroAsRequired';
const FE_PROCESS_READ_ONLY = 'processReadOnly';
const FE_IMAGE_CUT_RESIZE_WIDTH = 'resizeWidth';
const FE_IMAGE_CUT_KEEP_ORIGINAL = 'keepOriginal';
......
......@@ -267,15 +267,21 @@ class FillStoreForm {
// copy value to $newValues
if (isset($clientValues[$clientFieldName])) {
if ($formElement[FE_DYNAMIC_UPDATE] === 'yes' || $formElement[FE_MODE] === FE_MODE_REQUIRED || $formElement[FE_MODE] === FE_MODE_SHOW) {
if ($formElement[FE_DYNAMIC_UPDATE] === 'yes' ||
$formElement[FE_MODE] === FE_MODE_REQUIRED ||
$formElement[FE_MODE] === FE_MODE_SHOW ||
(isset($formElement[FE_PROCESS_READ_ONLY]) && $formElement[FE_PROCESS_READ_ONLY] != '0')) {
$val = $clientValues[$clientFieldName];
switch ($formElement[FE_TYPE]) {
case FE_TYPE_DATE:
case FE_TYPE_DATETIME:
case FE_TYPE_TIME:
if ($clientValues[$clientFieldName] !== '') // do not check empty values
if ($clientValues[$clientFieldName] !== '') { // do not check empty values
$val = $this->doDateTime($formElement, $val);
}
break;
default:
......@@ -288,6 +294,7 @@ class FillStoreForm {
if ($val !== '' && $formMode != FORM_UPDATE) {
$val = Sanitize::sanitize($val, $formElement[FE_CHECK_TYPE], $formElement[FE_CHECK_PATTERN],
$formElement[FE_DECIMAL_FORMAT], SANITIZE_EXCEPTION);
if ($formElement[FE_ENCODE] === FE_ENCODE_SPECIALCHAR) {
// $val = htmlspecialchars($val, ENT_QUOTES);
$val = Support::htmlEntityEncodeDecode(MODE_ENCODE, $val);
......
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