[TASK] Remove radio buttons from "new content elements" overview 66/12566/4
authorGeorg Ringer <georg.ringer@gmail.com>
Sun, 14 Apr 2013 12:39:56 +0000 (14:39 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Sun, 14 Apr 2013 13:02:10 +0000 (15:02 +0200)
Remove radio buttons from "new content elements" as icons
serves the same purpose
Change-Id: Ibea517d19389ad2645d630b4416e7f45207faec7
Fixes: #38623
Releases: 6.1
Reviewed-on: https://review.typo3.org/12566
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php

index 5ff5281..1cf8d14 100644 (file)
@@ -219,11 +219,17 @@ class NewContentElementController {
                                        $key = count($menuItems) - 1;
                                } else {
                                        $content = '';
-                                       // Radio button:
-                                       $oC = 'document.editForm.defValues.value=unescape(\'' . rawurlencode($wInfo['params']) . '\');goToalt_doc();' . (!$this->onClickEvent ? 'window.location.hash=\'#sel2\';' : '');
-                                       $content .= $this->elementWrapper['wizardPart'][0] . '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" />' . $this->elementWrapper['wizardPart'][1];
-                                       // Onclick action for icon/title:
-                                       $aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $oC . 'return false;';
+
+                                       if (!$this->onClickEvent) {
+                                               // Radio button:
+                                               $oC = 'document.editForm.defValues.value=unescape(\'' . rawurlencode($wInfo['params']) . '\');goToalt_doc();' . (!$this->onClickEvent ? 'window.location.hash=\'#sel2\';' : '');
+                                               $content .= $this->elementWrapper['wizardPart'][0] . '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" />' . $this->elementWrapper['wizardPart'][1];
+                                               // Onclick action for icon/title:
+                                               $aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $oC . 'return false;';
+                                       } else {
+                                               $aOnClick = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
+                                       }
+
                                        // Icon:
                                        $iInfo = @getimagesize($wInfo['icon']);
                                        $content .= $this->elementWrapper['wizardPart'][0] . '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">