Fixed bug #1402: Text area / RTE fields can't be set to required at the moment.
authorSusanne Moog <typo3@susannemoog.de>
Fri, 28 May 2010 12:16:30 +0000 (12:16 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 28 May 2010 12:16:30 +0000 (12:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7713 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index 32fb4fa..2f89b22 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 2010-05-28  Susanne Moog  <typo3@susanne-moog.de>
 
        * Follow-up to bug #14465: Make use of the new Sprite API throughout the TYPO3 Core Backend
+       * Fixed bug #1402: Text area / RTE fields can't be set to required at the moment.
 
 2010-05-28  Christian Kuhn  <lolli@schwarzbu.ch>
 
index d65b11b..dd04a03 100644 (file)
@@ -1228,6 +1228,7 @@ class t3lib_TCEforms      {
 
                        // Init config:
                $config = $PA['fieldConf']['config'];
+               $evalList = t3lib_div::trimExplode(',', $config['eval'], 1);
 
                if($this->renderReadonly || $config['readOnly'])  {
                        return $this->getSingleField_typeNone_render($config, $PA['itemFormElValue']);
@@ -1244,6 +1245,10 @@ class t3lib_TCEforms     {
                        if ($rows<$origRows)    $rows = $origRows;
                }
 
+               if (in_array('required', $evalList))    {
+                       $this->requiredFields[$table . '_' . $row['uid'] . '_' . $field] = $PA['itemFormElName'];
+               }
+
                        // Init RTE vars:
                $RTEwasLoaded = 0;                              // Set true, if the RTE is loaded; If not a normal textarea is shown.
                $RTEwouldHaveBeenLoaded = 0;    // Set true, if the RTE would have been loaded if it wasn't for the disable-RTE flag in the bottom of the page...