Răsfoiți Sursa

Minor improvement.

AntonLV 10 ani în urmă
părinte
comite
867afdd667
1 a modificat fișierele cu 10 adăugiri și 0 ștergeri
  1. 10 0
      template/scripts/BxBaseFormView.php

+ 10 - 0
template/scripts/BxBaseFormView.php

@@ -299,6 +299,12 @@ EOS;
      */
     function genViewRowValue(&$aInput)
     {
+        if (!empty($aInput['name'])) {
+            $sCustomMethod = 'genCustomViewRowValue' . $this->_genMethodName($aInput['name']);
+            if (method_exists($this, $sCustomMethod))
+                return $this->$sCustomMethod($aInput);
+        }
+
         switch ($aInput['type']) {
 
             case 'hidden':
@@ -343,6 +349,10 @@ EOS;
                     $sValue = null;
             break;
 
+            case 'custom':
+                $sValue = isset($aInput['content']) && '' !== $aInput['content'] ? bx_process_output($aInput['content'], BX_DATA_HTML) : null;
+                break;
+
             default:
                 $sValue = isset($aInput['value']) && '' !== $aInput['value'] ? bx_process_output($aInput['value']) : null;
         }