Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Bug #4614 radios do not line up
Submitted: 2005-06-16 20:19 UTC
From: jameslee at cs dot nmt dot edu Assigned: pmjones
Status: Closed Package: DB_Table
PHP Version: 4.3.11 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-16 20:19 UTC] jameslee at cs dot nmt dot edu
Description: ------------ When creating a column of type 'radio', DB_Table adds both a <br /> and a   between each radio button, causing them not to line up. The simplest way to fix this would be to change line 415 of QuickForm.php from: $btnlabel . '<br />', to: $btnlabel, It might also be desirable to have a 'qf_seperator' (or similar) that is added as the fourth parameter to addGroup on line 210 of QuickForm.php (Using version 1.0.1 stable) Reproduce code: --------------- $col = array( // ... 'Site' => array( 'type' => 'integer', 'qf_type' => 'radio', 'qf_vals' => array( '0' => 'on', '1' => 'off', ), ), );

Comments

 [2005-06-19 19:33 UTC] post at mark-wiesemann dot de
Please do not remove the '<br />' - this is very useful for longer labels. But this is really a bug, I have since months the following line in the function that outputs my forms: $html = str_replace('<br /></label> ', '</label><br />', $html); Don't know why I haven't submitted that as a bug. The suggested solution to use 'qf_seperator' (default if not set should be: '<br />') is very nice. Maybe you could also add a new parameter to getForm() function (same default value) that will be overridden for single elements if 'qf_seperator' is specified in the elements config array.
 [2005-07-24 16:40 UTC] pmjones
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.