Fixed bug #7396: hardcoded fieldset and legend around radio buttons
authorIngo Renner <ingo.renner@typo3.org>
Sun, 16 Mar 2008 10:39:13 +0000 (10:39 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Sun, 16 Mar 2008 10:39:13 +0000 (10:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3431 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/css_styled_content/static/setup.txt

index 5694d89..57ed1f4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-16  Ingo Renner  <ingo@typo3.org>
+
+       * Fixed bug #7396: hardcoded fieldset and legend around radio buttons
+
 2008-03-15  Ingo Renner  <ingo@typo3.org>
 
        * Added follow up to #7588: Accesscheck for clearCache, credits Steffen Kamper
index 6257bd6..60cfc3f 100755 (executable)
@@ -1858,9 +1858,7 @@ class tslib_cObj {
                                        break;
                                        case 'radio':
                                                $option='';
-                                               if ($conf['accessibility'])     {
-                                                       $option.='<fieldset'.$elementIdAttribute.'><legend>'.$confData['label'].'</legend>';
-                                               }
+
                                                $valueParts = explode(',',$parts[2]);
                                                $items=array();         // Where the items will be
                                                $default='';
@@ -1895,9 +1893,23 @@ class tslib_cObj {
                                                                $option .= $this->stdWrap(trim($items[$a][0]), $conf['radioWrap.']);
                                                        }
                                                }
+
                                                if ($conf['accessibility'])     {
-                                                       $option.='</fieldset>';
+                                                       $accessibilityWrap = $conf['radioWrap.']['accessibilityWrap'];
+
+                                                       $search = array(
+                                                               '###RADIO_FIELD_ID###',
+                                                               '###RADIO_GROUP_LABEL###'
+                                                       );
+                                                       $replace = array(
+                                                               $elementIdAttribute,
+                                                               $confData['label']
+                                                       );
+                                                       $accessibilityWrap = str_replace($search, $replace, $accessibilityWrap);
+
+                                                       $option = $this->wrap($option, $accessibilityWrap);
                                                }
+
                                                $fieldCode = $option;
                                        break;
                                        case 'hidden':
index b703415..dc9d7b5 100755 (executable)
@@ -504,7 +504,7 @@ tt_content.bullets {
 }
 
 [compatVersion = 4.2.0]
-tt_content.bullets.20 > 
+tt_content.bullets.20 >
 tt_content.bullets.20 = TEXT
 tt_content.bullets.20 {
        field = bodytext
@@ -1208,6 +1208,7 @@ tt_content.mailform.20 {
        labelWrap.wrap = |
        commentWrap.wrap = |
        radioWrap.wrap = |<br />
+       radioWrap.accessibilityWrap = <fieldset###RADIO_FIELD_ID###><legend>###RADIO_GROUP_LABEL###</legend>|</fieldset>
        REQ.labelWrap.wrap = |
        stdWrap.wrap = <fieldset class="csc-mailform"> | </fieldset>
        params.radio = class="csc-mailform-radio"
@@ -1533,7 +1534,7 @@ plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE (
 
 # new IMAGE features with last row configuration
 [compatVersion = 4.2.0]
+
 plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE := appendString(
        DIV.csc-textpic DIV.csc-textpic-imagerow-last { margin-bottom: 0; }
 )
@@ -1545,6 +1546,6 @@ tt_content.image.20.rendering {
 }
 
 [END]
+
 
 # TYPO3 CVS ID: $Id$