[#34009] Render checkboxes and radio button fields with layout#4022
[#34009] Render checkboxes and radio button fields with layout#4022rdeutz merged 17 commits intojoomla:stagingfrom
Conversation
6b8cd93 to
c03376c
Compare
|
♻️ |
|
so is this patch already merged? becaue before apply the checkboxes are shown in /administrator/index.php?option=com_templates&view=style&layout=edit&id=7 like you described in the tracker... This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4022. |
Signed-off-by: Elijah Madden <elijah.madden@nikkoam.com>
Signed-off-by: Elijah Madden <elijah.madden@nikkoam.com>
Signed-off-by: Elijah Madden <elijah.madden@nikkoam.com>
Signed-off-by: Elijah Madden <elijah.madden@nikkoam.com>
Signed-off-by: Elijah Madden <elijah.madden@nikkoam.com>
…d of simple string comparison.
c03376c to
94561cc
Compare
|
@designbengel No, unbelievably, this has still not been merged. The checkboxes you are talking about (I guess on the assignment tab) are not rendered with JForm, they're done directly in the template file. The purpose of this patch is to make JForm's rendering work more flexibly. Anyway, thanks for reminding me about this PR. I've now rebased it and made a minor change to modernize it a little. It should merge without issue and is kind of an obvious improvement. |
|
I have tested this and it looks good. Here is how I tested it:
<field type="checkboxes" name="somefield" label="Select Some Stuff">
<option value="a" checked="true">A</option>
<option value="b">B</option>
<option value="c">C</option>
</field>
|
|
Thanks to the test instructions @roland-d and for the fix @okonomiyaki3000! I have just tested it and it works good. --> RTC 😄 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4022. |
[#34009] Render checkboxes and radio button fields with layout
Tracker is here: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34009&start=0
How to reproduce the problem and/or test the patch::
Using Isis or any other Bootstrap-based template, have a look at a form with a 'checkboxes' field. The spacing and positioning is just not right.
Successful Tests:
Easy:
Summary
Checkboxes badly rendered with bootstrap
Details
The proper way to do checkboxes in Bootstrap is to wrap the input tag inside the label and give the label (not the input) the class 'checkbox'. When doing it this way, the label does not need a 'for' attribute and the input does not need an id. The label is automatically associated with an input that it wraps.
I suppose radio buttons should also be done this way.