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

Replaced string 'mode' and 'type' for formelements against constants FE_MODE and FE_TYPE

Support.php, FillStore.php, AbstractBuildFrom.php, BuildFormPlain.php, BuildFormTables.php, Constants.php, Save.php, BuildFormPlainTest.php
parent 4c49115a
...@@ -336,8 +336,8 @@ abstract class AbstractBuildForm { ...@@ -336,8 +336,8 @@ abstract class AbstractBuildForm {
// Iterate over all FormElements // Iterate over all FormElements
foreach ($this->feSpecNative as $fe) { foreach ($this->feSpecNative as $fe) {
if (($filter === FORM_ELEMENTS_NATIVE && $fe['type'] === 'subrecord') if (($filter === FORM_ELEMENTS_NATIVE && $fe[FE_TYPE] === 'subrecord')
|| ($filter === FORM_ELEMENTS_SUBRECORD && $fe['type'] !== 'subrecord') || ($filter === FORM_ELEMENTS_SUBRECORD && $fe[FE_TYPE] !== 'subrecord')
// || ($filter === FORM_ELEMENTS_DYNAMIC_UPDATE && $fe['dynamicUpdate'] === 'no') // || ($filter === FORM_ELEMENTS_DYNAMIC_UPDATE && $fe['dynamicUpdate'] === 'no')
) { ) {
continue; // skip this FE continue; // skip this FE
...@@ -369,7 +369,7 @@ abstract class AbstractBuildForm { ...@@ -369,7 +369,7 @@ abstract class AbstractBuildForm {
$htmlFormElementId = HelperFormElement::buildFormElementId($formElement['name'], ($htmlElementNameIdZero) ? 0 : $recordId); $htmlFormElementId = HelperFormElement::buildFormElementId($formElement['name'], ($htmlElementNameIdZero) ? 0 : $recordId);
// Construct Marshaller Name: buildElement // Construct Marshaller Name: buildElement
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']]; $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]];
$jsonElement = array(); $jsonElement = array();
// Render pure element // Render pure element
...@@ -397,7 +397,7 @@ abstract class AbstractBuildForm { ...@@ -397,7 +397,7 @@ abstract class AbstractBuildForm {
} }
// Construct Marshaller Name: buildRow // Construct Marshaller Name: buildRow
$buildRowName = 'buildRow' . $this->buildRowName[$formElement['type']]; $buildRowName = 'buildRow' . $this->buildRowName[$formElement[FE_TYPE]];
$html .= $this->$buildRowName($formElement, $elementHtml, $htmlFormElementId); $html .= $this->$buildRowName($formElement, $elementHtml, $htmlFormElementId);
// break; // break;
...@@ -566,7 +566,7 @@ abstract class AbstractBuildForm { ...@@ -566,7 +566,7 @@ abstract class AbstractBuildForm {
$attribute .= $this->getAttributeMode($formElement); $attribute .= $this->getAttributeMode($formElement);
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return "$htmlTag $attribute>$textarea" . $this->getHelpBlock(); return "$htmlTag $attribute>$textarea" . $this->getHelpBlock();
...@@ -580,7 +580,7 @@ abstract class AbstractBuildForm { ...@@ -580,7 +580,7 @@ abstract class AbstractBuildForm {
// MIN( $formElement['maxLength'], tabledefinition) // MIN( $formElement['maxLength'], tabledefinition)
$maxLength = $this->getColumnSize($formElement['name']); $maxLength = $this->getColumnSize($formElement['name']);
switch ($formElement['type']) { switch ($formElement[FE_TYPE]) {
case 'date': case 'date':
$feMaxLength = 10; $feMaxLength = 10;
break; break;
...@@ -647,7 +647,7 @@ abstract class AbstractBuildForm { ...@@ -647,7 +647,7 @@ abstract class AbstractBuildForm {
* Builds a HTML attribute list, based on $attributeList. * Builds a HTML attribute list, based on $attributeList.
* *
* E.g.: attributeList: [ 'type', 'autofocus' ] * E.g.: attributeList: [ 'type', 'autofocus' ]
* generates: 'type="$formElement['type']" autofocus="$formElement['autofocus']" ' * generates: 'type="$formElement[FE_TYPE]" autofocus="$formElement['autofocus']" '
* *
* @param array $formElement * @param array $formElement
* @param array $attributeList * @param array $attributeList
...@@ -714,7 +714,7 @@ abstract class AbstractBuildForm { ...@@ -714,7 +714,7 @@ abstract class AbstractBuildForm {
} }
/** /**
* Set corresponding html attributes readonly/required/disabled, based on $formElement['mode']. * Set corresponding html attributes readonly/required/disabled, based on $formElement[FE_MODE].
* *
* @param array $formElement * @param array $formElement
* @return string * @return string
...@@ -723,7 +723,7 @@ abstract class AbstractBuildForm { ...@@ -723,7 +723,7 @@ abstract class AbstractBuildForm {
private function getAttributeMode(array $formElement) { private function getAttributeMode(array $formElement) {
$attribute = ''; $attribute = '';
switch ($formElement['mode']) { switch ($formElement[FE_MODE]) {
case 'show': case 'show':
break; break;
case 'readonly': case 'readonly':
...@@ -740,8 +740,8 @@ abstract class AbstractBuildForm { ...@@ -740,8 +740,8 @@ abstract class AbstractBuildForm {
default: default:
// Preparation for Log, Debug // Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($formElement), STORE_SYSTEM); $this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($formElement), STORE_SYSTEM);
$this->store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, 'mode', STORE_SYSTEM); $this->store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, FE_MODE, STORE_SYSTEM);
throw new UserFormException("Unknown mode '" . $formElement['mode'] . "'", ERROR_UNKNOWN_MODE); throw new UserFormException("Unknown mode '" . $formElement[FE_MODE] . "'", ERROR_UNKNOWN_MODE);
break; break;
} }
return $attribute; return $attribute;
...@@ -790,7 +790,7 @@ abstract class AbstractBuildForm { ...@@ -790,7 +790,7 @@ abstract class AbstractBuildForm {
} }
$attributeBase = $this->getAttributeMode($formElement); $attributeBase = $this->getAttributeMode($formElement);
$attributeBase .= Support::doAttribute('type', $formElement['type']); $attributeBase .= Support::doAttribute('type', $formElement[FE_TYPE]);
switch ($formElement['checkBoxMode']) { switch ($formElement['checkBoxMode']) {
case 'single': case 'single':
...@@ -803,7 +803,7 @@ abstract class AbstractBuildForm { ...@@ -803,7 +803,7 @@ abstract class AbstractBuildForm {
throw new UserFormException('checkBoxMode: \'' . $formElement['checkBoxMode'] . '\' is unknown.', ERROR_CHECKBOXMODE_UNKNOWN); throw new UserFormException('checkBoxMode: \'' . $formElement['checkBoxMode'] . '\' is unknown.', ERROR_CHECKBOXMODE_UNKNOWN);
} }
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
// return Support::wrapTag('<div class="checkbox">', $html, true); // return Support::wrapTag('<div class="checkbox">', $html, true);
return $html; return $html;
} }
...@@ -1099,7 +1099,7 @@ abstract class AbstractBuildForm { ...@@ -1099,7 +1099,7 @@ abstract class AbstractBuildForm {
$attributeBase = $this->getAttributeMode($formElement); $attributeBase = $this->getAttributeMode($formElement);
$attributeBase .= Support::doAttribute('name', $htmlFormElementId); $attributeBase .= Support::doAttribute('name', $htmlFormElementId);
$attributeBase .= Support::doAttribute('type', $formElement['type']); $attributeBase .= Support::doAttribute('type', $formElement[FE_TYPE]);
$attributeBase .= Support::doAttribute('data-load', ($formElement['dynamicUpdate'] === 'yes') ? 'data-load' : ''); $attributeBase .= Support::doAttribute('data-load', ($formElement['dynamicUpdate'] === 'yes') ? 'data-load' : '');
$jj = 0; $jj = 0;
...@@ -1126,8 +1126,8 @@ abstract class AbstractBuildForm { ...@@ -1126,8 +1126,8 @@ abstract class AbstractBuildForm {
// $element = Support::wrapTag('<label>',$element); // $element = Support::wrapTag('<label>',$element);
// if(isset($this->feDivClass[$formElement['type']]) && $this->feDivClass[$formElement['type']] != '') { // if(isset($this->feDivClass[$formElement[FE_TYPE]]) && $this->feDivClass[$formElement[FE_TYPE]] != '') {
// $element = Support::wrapTag('<div class="' . $this->feDivClass[$formElement['type']] .'">', $element); // $element = Support::wrapTag('<div class="' . $this->feDivClass[$formElement[FE_TYPE]] .'">', $element);
// } // }
$html .= $element; $html .= $element;
...@@ -1138,7 +1138,7 @@ abstract class AbstractBuildForm { ...@@ -1138,7 +1138,7 @@ abstract class AbstractBuildForm {
} }
} }
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return $html; return $html;
} }
...@@ -1192,7 +1192,7 @@ abstract class AbstractBuildForm { ...@@ -1192,7 +1192,7 @@ abstract class AbstractBuildForm {
$option .= '>' . $itemValue[$ii] . '</option>'; $option .= '>' . $itemValue[$ii] . '</option>';
} }
$json = $this->getJsonElementUpdate($htmlFormElementId, $jsonValues, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $jsonValues, $formElement[FE_MODE]);
return '<select ' . $attribute . '>' . $option . '</select>' . $this->getHelpBlock(); return '<select ' . $attribute . '>' . $option . '</select>' . $this->getHelpBlock();
} }
...@@ -1577,7 +1577,7 @@ abstract class AbstractBuildForm { ...@@ -1577,7 +1577,7 @@ abstract class AbstractBuildForm {
} else { } else {
$textDeleteClass = ''; $textDeleteClass = '';
$uploadClass = 'hidden'; $uploadClass = 'hidden';
$formElement['mode'] = 'disabled'; $formElement[FE_MODE] = 'disabled';
} }
$attribute .= $this->getAttributeMode($formElement); $attribute .= $this->getAttributeMode($formElement);
...@@ -1591,7 +1591,7 @@ abstract class AbstractBuildForm { ...@@ -1591,7 +1591,7 @@ abstract class AbstractBuildForm {
// <button type="button" class="file-delete" data-sip="571d1fc9e6974"><span class="glyphicon glyphicon-trash"></span></button> // <button type="button" class="file-delete" data-sip="571d1fc9e6974"><span class="glyphicon glyphicon-trash"></span></button>
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return $htmlTextDelete . $htmlInputFile . $hiddenSipUpload; return $htmlTextDelete . $htmlInputFile . $hiddenSipUpload;
} }
...@@ -1643,7 +1643,7 @@ abstract class AbstractBuildForm { ...@@ -1643,7 +1643,7 @@ abstract class AbstractBuildForm {
$attribute .= $this->getAttributeMode($formElement); $attribute .= $this->getAttributeMode($formElement);
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return "$htmlTag $attribute>$textarea"; return "$htmlTag $attribute>$textarea";
...@@ -1671,11 +1671,11 @@ abstract class AbstractBuildForm { ...@@ -1671,11 +1671,11 @@ abstract class AbstractBuildForm {
$arrMinMax = null; $arrMinMax = null;
$this->adjustMaxLength($formElement); $this->adjustMaxLength($formElement);
$showTime = ($formElement['type'] == 'time' || $formElement['type'] == 'datetime') ? 1 : 0; $showTime = ($formElement[FE_TYPE] == 'time' || $formElement[FE_TYPE] == 'datetime') ? 1 : 0;
$value = Support::convertDateTime($value, $formElement[FE_DATE_FORMAT], $formElement[FE_SHOW_ZERO], $showTime, $formElement[FE_SHOW_SECONDS]); $value = Support::convertDateTime($value, $formElement[FE_DATE_FORMAT], $formElement[FE_SHOW_ZERO], $showTime, $formElement[FE_SHOW_SECONDS]);
$tmpPattern = $formElement['checkPattern']; $tmpPattern = $formElement['checkPattern'];
$formElement['checkPattern'] = Support::dateTimeRegexp($formElement['type'], $formElement['dateFormat']); $formElement['checkPattern'] = Support::dateTimeRegexp($formElement[FE_TYPE], $formElement['dateFormat']);
switch ($formElement['checkType']) { switch ($formElement['checkType']) {
...@@ -1702,7 +1702,7 @@ abstract class AbstractBuildForm { ...@@ -1702,7 +1702,7 @@ abstract class AbstractBuildForm {
$value = substr($value, 0, $formElement['maxLength']); $value = substr($value, 0, $formElement['maxLength']);
} }
$type = $formElement['type']; $type = $formElement[FE_TYPE];
if ($type === 'datetime') if ($type === 'datetime')
$type = 'datetime-local'; $type = 'datetime-local';
...@@ -1715,7 +1715,7 @@ abstract class AbstractBuildForm { ...@@ -1715,7 +1715,7 @@ abstract class AbstractBuildForm {
if ($formElement['placeholder'] == '') { if ($formElement['placeholder'] == '') {
$timePattern = ($formElement[FE_SHOW_SECONDS] == 1) ? 'hh:mm:ss' : 'hh:mm'; $timePattern = ($formElement[FE_SHOW_SECONDS] == 1) ? 'hh:mm:ss' : 'hh:mm';
switch ($formElement['type']) { switch ($formElement[FE_TYPE]) {
case 'date': case 'date':
$placeholder = $formElement['dateFormat']; $placeholder = $formElement['dateFormat'];
break; break;
...@@ -1726,7 +1726,7 @@ abstract class AbstractBuildForm { ...@@ -1726,7 +1726,7 @@ abstract class AbstractBuildForm {
$placeholder = $timePattern; $placeholder = $timePattern;
break; break;
default: default:
throw new UserFormException("Unexpected Formelement type: '" . $formElement['type'] . "'", ERROR_FORMELEMENT_TYPE); throw new UserFormException("Unexpected Formelement type: '" . $formElement[FE_TYPE] . "'", ERROR_FORMELEMENT_TYPE);
} }
$formElement['placeholder'] = $placeholder; $formElement['placeholder'] = $placeholder;
} }
...@@ -1743,7 +1743,7 @@ abstract class AbstractBuildForm { ...@@ -1743,7 +1743,7 @@ abstract class AbstractBuildForm {
$attribute .= $this->getAttributeMode($formElement); $attribute .= $this->getAttributeMode($formElement);
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return "<input $attribute>" . $this->getHelpBlock(); return "<input $attribute>" . $this->getHelpBlock();
...@@ -1827,7 +1827,7 @@ abstract class AbstractBuildForm { ...@@ -1827,7 +1827,7 @@ abstract class AbstractBuildForm {
// restore parent processed FE's // restore parent processed FE's
$this->feSpecNative = $tmpStore; $this->feSpecNative = $tmpStore;
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement['mode']); $json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
return $html; return $html;
} }
......
...@@ -70,7 +70,7 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -70,7 +70,7 @@ class BuildFormPlain extends AbstractBuildForm {
$html = ''; $html = '';
// Construct Marshaller Name // Construct Marshaller Name
// $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']]; // $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]];
if($formElement['nestedInFieldSet']==='no') if($formElement['nestedInFieldSet']==='no')
......
...@@ -97,9 +97,9 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -97,9 +97,9 @@ class BuildFormTable extends AbstractBuildForm {
$html = ''; $html = '';
// Construct Marshaller Name // Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']]; $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]];
if ($formElement['type'] === 'subrecord') { if ($formElement[FE_TYPE] === 'subrecord') {
// subrecord in render='table' are outside the table // subrecord in render='table' are outside the table
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['label']); $html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['label']);
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $htmlElement); $html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $htmlElement);
......
...@@ -373,6 +373,7 @@ const FE_SUBRECORD_ROW_TITLE = '_rowTitle'; ...@@ -373,6 +373,7 @@ const FE_SUBRECORD_ROW_TITLE = '_rowTitle';
// FormElement columns: real // FormElement columns: real
const FE_TYPE = 'type'; const FE_TYPE = 'type';
const FE_MODE = 'mode';
// FormElement columns: via parameter field // FormElement columns: via parameter field
const FE_DATE_FORMAT = 'dateFormat'; // value: FORMAT_DATE_INTERNATIONAL | FORMAT_DATE_GERMAN const FE_DATE_FORMAT = 'dateFormat'; // value: FORMAT_DATE_INTERNATIONAL | FORMAT_DATE_GERMAN
......
...@@ -123,7 +123,7 @@ class Save { ...@@ -123,7 +123,7 @@ class Save {
foreach ($this->feSpecNative AS $formElement) { foreach ($this->feSpecNative AS $formElement) {
// skip non upload formElements // skip non upload formElements
if ($formElement['type'] != 'upload') { if ($formElement[FE_TYPE] != 'upload') {
continue; continue;
} }
......
...@@ -425,7 +425,7 @@ class Support { ...@@ -425,7 +425,7 @@ class Support {
public static function getDateTimePlaceholder(array $formElement) { public static function getDateTimePlaceholder(array $formElement) {
$timePattern = ($formElement[FE_SHOW_SECONDS] == 1) ? 'hh:mm:ss' : 'hh:mm'; $timePattern = ($formElement[FE_SHOW_SECONDS] == 1) ? 'hh:mm:ss' : 'hh:mm';
switch ($formElement['type']) { switch ($formElement[FE_TYPE]) {
case 'date': case 'date':
$placeholder = $formElement['dateFormat']; $placeholder = $formElement['dateFormat'];
break; break;
...@@ -436,7 +436,7 @@ class Support { ...@@ -436,7 +436,7 @@ class Support {
$placeholder = $timePattern; $placeholder = $timePattern;
break; break;
default: default:
throw new UserFormException("Unexpected Formelement type: '" . $formElement['type'] . "'", ERROR_FORMELEMENT_TYPE); throw new UserFormException("Unexpected Formelement type: '" . $formElement[FE_TYPE] . "'", ERROR_FORMELEMENT_TYPE);
} }
return $placeholder; return $placeholder;
......
...@@ -120,7 +120,7 @@ class FillStoreForm { ...@@ -120,7 +120,7 @@ class FillStoreForm {
// Preparation for Log, Debug // Preparation for Log, Debug
// $this->store->setVar(SYSTEM_FORM_ELEMENT, $formElement['name'] . ' / ' . $formElement['id'], STORE_SYSTEM); // $this->store->setVar(SYSTEM_FORM_ELEMENT, $formElement['name'] . ' / ' . $formElement['id'], STORE_SYSTEM);
if ($formElement['type'] == 'hidden') { if ($formElement[FE_TYPE] == 'hidden') {
// Hidden elements will be transferred by SIP // Hidden elements will be transferred by SIP
if (!isset($sipValues[$formElement['name']])) { if (!isset($sipValues[$formElement['name']])) {
throw new CodeException("Missing the hidden field '" . $formElement['name'] . "' in SIP.", ERROR_MISSING_HIDDEN_FIELD_IN_SIP); throw new CodeException("Missing the hidden field '" . $formElement['name'] . "' in SIP.", ERROR_MISSING_HIDDEN_FIELD_IN_SIP);
...@@ -130,13 +130,13 @@ class FillStoreForm { ...@@ -130,13 +130,13 @@ class FillStoreForm {
continue; continue;
} }
if ($formElement['mode'] === FE_MODE_REQUIRED) { if ($formElement[FE_MODE] === FE_MODE_REQUIRED) {
if (!isset($clientValues[$clientFieldName]) || ($clientValues[$clientFieldName] === '')) { if (!isset($clientValues[$clientFieldName]) || ($clientValues[$clientFieldName] === '')) {
throw new UserFormException("Missing required value.", ERROR_REQUIRED_VALUE_EMPTY); throw new UserFormException("Missing required value.", ERROR_REQUIRED_VALUE_EMPTY);
} }
} }
switch ($formElement['mode']) { switch ($formElement[FE_MODE]) {
case FE_MODE_REQUIRED: case FE_MODE_REQUIRED:
case FE_MODE_SHOW: case FE_MODE_SHOW:
if (isset($clientValues[$clientFieldName])) { if (isset($clientValues[$clientFieldName])) {
...@@ -151,7 +151,7 @@ class FillStoreForm { ...@@ -151,7 +151,7 @@ class FillStoreForm {
$clientValues[$clientFieldName] = implode(',', $clientValues[$clientFieldName]); $clientValues[$clientFieldName] = implode(',', $clientValues[$clientFieldName]);
} }
switch ($formElement['type']) { switch ($formElement[FE_TYPE]) {
case 'date': case 'date':
case 'datetime': case 'datetime':
case 'time': case 'time':
...@@ -171,7 +171,7 @@ class FillStoreForm { ...@@ -171,7 +171,7 @@ class FillStoreForm {
case FE_MODE_DISABLED: case FE_MODE_DISABLED:
continue; continue;
default: default:
throw new CodeException("Unknown mode: " . $formElement['mode'], ERROR_UNKNOWN_MODE); throw new CodeException("Unknown mode: " . $formElement[FE_MODE], ERROR_UNKNOWN_MODE);
} }
} }
...@@ -188,14 +188,14 @@ class FillStoreForm { ...@@ -188,14 +188,14 @@ class FillStoreForm {
*/ */
private function doDateTime(array &$formElement, $value) { private function doDateTime(array &$formElement, $value) {
$regexp = Support::dateTimeRegexp($formElement['type'], $formElement['dateFormat']); $regexp = Support::dateTimeRegexp($formElement[FE_TYPE], $formElement['dateFormat']);
if (1 !== preg_match('/' . $regexp . '/', $value, $matches)) { if (1 !== preg_match('/' . $regexp . '/', $value, $matches)) {
$placeholder = Support::getDateTimePlaceholder($formElement); $placeholder = Support::getDateTimePlaceholder($formElement);
throw new UserFormException("DateTime format not recognized: $placeholder / $value ", ERROR_DATE_TIME_FORMAT_NOT_RECOGNISED); throw new UserFormException("DateTime format not recognized: $placeholder / $value ", ERROR_DATE_TIME_FORMAT_NOT_RECOGNISED);
} }
$showTime = $formElement['type'] == 'date' ? '0' : '1'; $showTime = $formElement[FE_TYPE] == 'date' ? '0' : '1';
$value = Support::convertDateTime($value, FORMAT_DATE_INTERNATIONAL, '1', $showTime, $formElement[FE_SHOW_SECONDS]); $value = Support::convertDateTime($value, FORMAT_DATE_INTERNATIONAL, '1', $showTime, $formElement[FE_SHOW_SECONDS]);
return $value; return $value;
......
...@@ -193,9 +193,9 @@ class BuildFormPlainTest extends AbstractDatabaseTest { ...@@ -193,9 +193,9 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
'enabled' => 'yes', 'enabled' => 'yes',
'name' => 'name', 'name' => 'name',
'label' => 'Name', 'label' => 'Name',
'mode' => 'show', FE_MODE => 'show',
'class' => 'native', 'class' => 'native',
'type' => 'input', FE_TYPE => 'input',
'value' => '', 'value' => '',
'sql1' => '', 'sql1' => '',
'parameter' => '', 'parameter' => '',
......
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