Skip to content

[#34009] Render checkboxes and radio button fields with layout#4022

Merged
rdeutz merged 17 commits intojoomla:stagingfrom
okonomiyaki3000:stg-boostrap_checkboxes
Oct 1, 2015
Merged

[#34009] Render checkboxes and radio button fields with layout#4022
rdeutz merged 17 commits intojoomla:stagingfrom
okonomiyaki3000:stg-boostrap_checkboxes

Conversation

@okonomiyaki3000
Copy link
Copy Markdown
Contributor

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.

@okonomiyaki3000 okonomiyaki3000 changed the title Render checkboxes and radio button fields with layout [#34009] Render checkboxes and radio button fields with layout Jul 28, 2014
@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

♻️

@coolcat-creations
Copy link
Copy Markdown
Contributor

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.

@okonomiyaki3000 okonomiyaki3000 force-pushed the stg-boostrap_checkboxes branch from c03376c to 94561cc Compare June 8, 2015 00:40
@okonomiyaki3000
Copy link
Copy Markdown
Contributor Author

@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.

@roland-d
Copy link
Copy Markdown
Contributor

I have tested this and it looks good. Here is how I tested it:

  1. Find the file plugins/user/profile/profiles/profile.xml
  2. Add the code
<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>
  1. Go to Extensions -> Plugins
  2. Find the user profile plugin and enable it
  3. Go to the Users -> Manage
  4. Edit a user
  5. Go to the Profile tab and see the alignment of the checkboxes
  6. Apply this PR
  7. Refresh the page and see the alignment of the checkboxes again
  8. The checkboxes are correctly aligned now

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Aug 24, 2015

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.

@joomla-cms-bot joomla-cms-bot added RTC This Pull Request is Ready To Commit Unit/System Tests labels Aug 24, 2015
@zero-24 zero-24 added this to the Joomla! 3.4.4 milestone Aug 25, 2015
@Kubik-Rubik Kubik-Rubik modified the milestones: Joomla! 3.4.5, Joomla! 3.4.4 Sep 3, 2015
rdeutz added a commit that referenced this pull request Oct 1, 2015
[#34009] Render checkboxes and radio button fields with layout
@rdeutz rdeutz merged commit 47f4218 into joomla:staging Oct 1, 2015
@okonomiyaki3000 okonomiyaki3000 deleted the stg-boostrap_checkboxes branch October 2, 2015 08:00
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 2, 2015
@zero-24 zero-24 modified the milestones: Joomla! 3.4.6, Joomla! 3.5.0 Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants