Fixed bug #10084: Hardcoded "Toggle All" and " Add New" in section
authorSteffen Kamper <info@sk-typo3.de>
Sat, 10 Jan 2009 23:18:29 +0000 (23:18 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 10 Jan 2009 23:18:29 +0000 (23:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4679 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
typo3/sysext/lang/locallang_core.xml

index e36e0cb..aa1ba44 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-11  Steffen Kamper  <info@sk-typo3.de> 
+
+       * Fixed bug #10084: Hardcoded "Toggle All" and " Add New" in section 
+       
 2009-01-10  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #10090: Hanging record sets in t3lib_TCEmain
index a34250d..3b50d98 100755 (executable)
@@ -2607,22 +2607,29 @@ class t3lib_TCEforms    {
                                                                // Kasper's comment (kept for history): Maybe there is a better way to do this than store the HTML for the new element in rawurlencoded format - maybe it even breaks with certain charsets? But for now this works...
                                                                $this->additionalJS_post = $additionalJS_post_saved;
                                                                $this->additionalJS_submit = $additionalJS_submit_saved;
-                                                               $newElementsLinks[]= '<a href="#" onclick="'.htmlspecialchars($onClickInsert).'"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_el.gif','width="11" height="12"').' alt="New" title="New" align="absmiddle" />'.htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($nCfg['tx_templavoila']['title']),30)).'</a>';
+                                                               $new = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.new', 1); 
+                                                               $newElementsLinks[]= '<a href="#" onclick="'.htmlspecialchars($onClickInsert).'">
+                                                                       <img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_el.gif','width="11" height="12"').' alt="' . $new . '" title="' . $new . '" align="absmiddle" />' .
+                                                                       htmlspecialchars(t3lib_div::fixed_lgd_cs($this->sL($nCfg['tx_templavoila']['title']),30)) . '</a>';
                                                        }
 
                                                                // Reverting internal variables we don't want to change:
                                                        $this->requiredElements = $TEMP_requiredElements;
 
                                                                // Adding the sections:
+                                                       $toggleAll = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.toggleall', 1);
                                                        $output.= '
-                                                       <div style="padding: 2px 0px 2px 20px;">
+                                                       <div style="padding: 5px 0px 5px 20px;">
                                                        <a href="#" onclick="'.htmlspecialchars('flexFormToggleSubs("'.$idTagPrefix.'"); return false;').'">
-                                                               <img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="Toggle All" title="Toggle All" /><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="Toggle All" title="Toggle All" />Toggle All
+                                                               <img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' . 
+                                                               $toggleAll . '" title="' . $toggleAll . '" />
+                                                               <img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/pil2right.gif','width="7" height="12"').' align="absmiddle" alt="' .
+                                                               $toggleAll . '" title="' . $toggleAll . '" />' . $toggleAll . '
                                                        </a>
                                                        </div>
 
                                                        <div id="'.$idTagPrefix.'" style="padding-left: 20px;">'.implode('',$tRows).'</div>';
-                                                       $output.= $mayRestructureFlexforms ? '<div style="padding: 10px 5px 5px 20px;"><b>Add new:</b> '.implode(' | ',$newElementsLinks).'</div>' : '';
+                                                       $output.= $mayRestructureFlexforms ? '<div style="padding: 10px 5px 5px 20px;"><b>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.toggleall', 1) . ':</b> '.implode(' | ',$newElementsLinks).'</div>' : '';
                                                } else {
                                                        // It is a container
 
index 5ab2d38..4aa16a6 100755 (executable)
@@ -66,6 +66,8 @@ Do you want to continue WITHOUT saving?</label>
                        <label index="labels.refreshList">Reload list from server</label>
                        <label index="labels.close">Close</label>
                        <label index="labels.new">NEW</label>
+                       <label index="labels.addnew">Add new</label>
+                       <label index="labels.toggleall">Toggle all</label>
                        <label index="labels.selected">Selected</label>
                        <label index="labels.items">Items</label>
                        <label index="labels.remove_selected">Remove selected items</label>