Commit 7365bbcd authored by Carsten  Rose's avatar Carsten Rose
Browse files

Bug #5390 - input validation decimal broken. fixed

parent c4545f5e
...@@ -484,7 +484,7 @@ abstract class AbstractBuildForm { ...@@ -484,7 +484,7 @@ abstract class AbstractBuildForm {
$storeRecord = $this->store->getStore(STORE_RECORD); $storeRecord = $this->store->getStore(STORE_RECORD);
$value = $this->report->process($this->bodytextParser->process($value), false); $value = $this->report->process($this->bodytextParser->process($value), false);
$this->store->setStore($storeRecord, STORE_RECORD, true); $this->store->setStore($storeRecord, STORE_RECORD, true);
$this->store->setVar(SYSTEM_REPORT_FULL_LEVEL, '', STORE_SYSTEM);
} }
return $value; return $value;
...@@ -1325,6 +1325,7 @@ abstract class AbstractBuildForm { ...@@ -1325,6 +1325,7 @@ abstract class AbstractBuildForm {
$column = $formElement[FE_NAME]; $column = $formElement[FE_NAME];
$matches = array(); $matches = array();
$inputType = 'number';
$typeSpec = $this->store->getVar($column, STORE_TABLE_COLUMN_TYPES); $typeSpec = $this->store->getVar($column, STORE_TABLE_COLUMN_TYPES);
switch ($typeSpec) { switch ($typeSpec) {
...@@ -1389,6 +1390,7 @@ abstract class AbstractBuildForm { ...@@ -1389,6 +1390,7 @@ abstract class AbstractBuildForm {
case 'float': case 'float':
case 'double': case 'double':
$checkType = SANITIZE_ALLOW_NUMERICAL; $checkType = SANITIZE_ALLOW_NUMERICAL;
$inputType = 'text';
break; break;
case 'bit': case 'bit':
$checkType = SANITIZE_ALLOW_DIGIT; $checkType = SANITIZE_ALLOW_DIGIT;
...@@ -1408,7 +1410,7 @@ abstract class AbstractBuildForm { ...@@ -1408,7 +1410,7 @@ abstract class AbstractBuildForm {
$formElement[FE_CHECK_TYPE] = $checkType; $formElement[FE_CHECK_TYPE] = $checkType;
if (empty($formElement[FE_INPUT_TYPE])) { if (empty($formElement[FE_INPUT_TYPE])) {
$formElement[FE_INPUT_TYPE] = 'number'; $formElement[FE_INPUT_TYPE] = $inputType;
} }
} }
......
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