From be1656af466dc23e8f4dc1df9bf9b94cd8024e42 Mon Sep 17 00:00:00 2001
From: Carsten  Rose <carsten.rose@math.uzh.ch>
Date: Thu, 8 Feb 2018 09:52:04 +0100
Subject: [PATCH] Bug #5390 - input validation decimal broken. fixed

---
 extension/qfq/qfq/AbstractBuildForm.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/extension/qfq/qfq/AbstractBuildForm.php b/extension/qfq/qfq/AbstractBuildForm.php
index ec935fc88..39d8aa7b9 100644
--- a/extension/qfq/qfq/AbstractBuildForm.php
+++ b/extension/qfq/qfq/AbstractBuildForm.php
@@ -484,7 +484,7 @@ abstract class AbstractBuildForm {
             $storeRecord = $this->store->getStore(STORE_RECORD);
             $value = $this->report->process($this->bodytextParser->process($value), false);
             $this->store->setStore($storeRecord, STORE_RECORD, true);
-
+            $this->store->setVar(SYSTEM_REPORT_FULL_LEVEL, '', STORE_SYSTEM);
         }
 
         return $value;
@@ -1325,6 +1325,7 @@ abstract class AbstractBuildForm {
 
         $column = $formElement[FE_NAME];
         $matches = array();
+        $inputType = 'number';
 
         $typeSpec = $this->store->getVar($column, STORE_TABLE_COLUMN_TYPES);
         switch ($typeSpec) {
@@ -1389,6 +1390,7 @@ abstract class AbstractBuildForm {
             case 'float':
             case 'double':
                 $checkType = SANITIZE_ALLOW_NUMERICAL;
+            $inputType = 'text';
                 break;
             case 'bit':
                 $checkType = SANITIZE_ALLOW_DIGIT;
@@ -1408,7 +1410,7 @@ abstract class AbstractBuildForm {
             $formElement[FE_CHECK_TYPE] = $checkType;
 
             if (empty($formElement[FE_INPUT_TYPE])) {
-                $formElement[FE_INPUT_TYPE] = 'number';
+                $formElement[FE_INPUT_TYPE] = $inputType;
             }
         }
 
-- 
GitLab