8561 Checkboxes and labels are aligned badly if in one line
authorSteffen Kamper <info@sk-typo3.de>
Tue, 25 Nov 2008 08:47:53 +0000 (08:47 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 25 Nov 2008 08:47:53 +0000 (08:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@4485 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_tceforms.php
typo3/sysext/beuser/mod/index.php
typo3/sysext/t3skin/stylesheets/stylesheet_post.css

index 220514e..c6c90f8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-25  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug 8561 Checkboxes and labels are aligned badly if in one line
+
 2008-11-24  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #9806: Mountpoints do not work across domain boundaries
index 900ce11..64fd510 100755 (executable)
@@ -2631,7 +2631,7 @@ final class t3lib_BEfunc {
 
                if (!$script) {basename(PATH_thisScript);}
                $onClick = 'jumpToUrl(\''.$script.'?'.$mainParams.$addparams.'&'.$elementName.'=\'+(this.checked?1:0),this);';
-               return '<input type="checkbox" name="'.$elementName.'"'.($currentValue?' checked="checked"':'').' onclick="'.htmlspecialchars($onClick).'"'.($tagParams?' '.$tagParams:'').' />';
+               return '<input type="checkbox" class="checkbox" name="'.$elementName.'"'.($currentValue?' checked="checked"':'').' onclick="'.htmlspecialchars($onClick).'"'.($tagParams?' '.$tagParams:'').' />';
        }
 
        /**
index 5221a1b..a2e24cb 100755 (executable)
@@ -1111,7 +1111,7 @@ class t3lib_TCEforms      {
                                $checkSetValue = gmdate('Y');
                        }
                        $cOnClick = 'typo3form.fieldGet('.$paramsList.',1,\''.$checkSetValue.'\');'.implode('',$PA['fieldChangeFunc']);
-                       $item.='<input type="checkbox"'.$this->insertDefStyle('check').' name="'.$PA['itemFormElName'].'_cb" onclick="'.htmlspecialchars($cOnClick).'" />';
+                       $item.='<input type="checkbox" class="' . $this->formElStyleClassValue('check', TRUE) . ' alignToInputText"  name="' . $PA['itemFormElName'] . '_cb" onclick="'.htmlspecialchars($cOnClick) . '" />';
                }
                if ((in_array('date',$evalList) || in_array('datetime',$evalList)) && $PA['itemFormElValue']>0){
                                // Add server timezone offset to UTC to our stored date
index 9cd0db8..264adbe 100755 (executable)
@@ -1317,7 +1317,7 @@ class SC_mod_tools_be_user_index {
                } else {
                        $menu=array();
                        foreach ($options as $kk => $vv) {
-                               $menu[]='<input type="checkbox" value="1" name="compareFlags['.$kk.']" id="checkCompare_'.$kk.'"'.($compareFlags[$kk]?' checked="checked"':'').'> <label for="checkCompare_'.$kk.'">'.htmlspecialchars($vv).'</label>';
+                               $menu[]='<input type="checkbox" class="checkbox" value="1" name="compareFlags['.$kk.']" id="checkCompare_'.$kk.'"'.($compareFlags[$kk]?' checked="checked"':'').'> <label for="checkCompare_'.$kk.'">'.htmlspecialchars($vv).'</label>';
                        }
                        $outCode = 'Group by:<br />'.implode('<br />',$menu);
                        $content = $this->doc->section('Group and Compare Users',$outCode,0,1);
@@ -1620,4 +1620,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
index 43b182e..8b1278c 100644 (file)
@@ -94,10 +94,19 @@ input[type="checkbox"] {
 }
 
 .checkbox,
+.radio,
 .checkbox:hover {
        width: 13px;
        height: 13px;
        overflow: hidden;
+       vertical-align: middle;
+       margin-right: 5px;
+}
+
+.alignToInputText {
+       vertical-align: top; 
+       margin-top: 5px;
+       margin-right: 2px;
 }
 
 label {