? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
20 Mar 2018

While looking at issue #19943 I saw that btn-group for radios is again broken in J4.
I've fixed that previously with #19326, but I think with the PR to separate the layouts that PR got "reverted".
So this PR again reinstates the fix from my previous PR.

Summary of Changes

Adds proper classes to support btn-group behaviours from J3.

Testing Instructions

(copied from original PR)
To test, you can add the following code to the config.xml of any extension. Eg to /administrator/components/com_content/config.xml. Just put it right after the <config> tag.

	<fieldset
		name="test"
		label="Test"
	>
		<field
			name="plain"
			type="radio"
			class=""
			default="1"
		>
			<option value="1">Foo</option>
			<option value="0">Bar</option>
		</field>

		<field
			name="btn-group"
			type="radio"
			class="btn-group"
			default="1"
		>
			<option value="1">Foo</option>
			<option value="0">Bar</option>
		</field>

		<field
			name="btn-group-yesno"
			type="radio"
			class="btn-group btn-group-yesno"
			default="1"
		>
			<option value="1">JYES</option>
			<option value="0">JNO</option>
		</field>

		<field
			name="btn-group-yesno reordered"
			type="radio"
			class="btn-group btn-group-yesno"
			default="1"
		>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>

		<field
			name="switcher"
			type="radio"
			class="switcher"
			default="1"
		>
			<option value="0">JNO</option>
			<option value="1">JYES</option>
		</field>
	</fieldset>

Now go to the settings of that component. You will have a new tab with 5 parameters.
Check if the radios work.
Make also sure the plain radios and the switcher work as well.

Expected result

image
All radios work
We even get some styling as expected, but main point is they work ?

Actual result

image
The marked radios are not working (and styling doesn't exist).

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Bakual Bakual - open - 20 Mar 2018
avatar Bakual Bakual - change - 20 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2018
Category Layout
avatar Bakual Bakual - change - 20 Mar 2018
The description was changed
avatar Bakual Bakual - edited - 20 Mar 2018
avatar infograf768 infograf768 - change - 20 Mar 2018
Title
Fixing btn-group (again)
[4.0] Fixing btn-group (again)
avatar infograf768 infograf768 - edited - 20 Mar 2018
avatar tassosm
tassosm - comment - 2 Apr 2018

I have tested this item successfully on 831743c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19946.

avatar tassosm tassosm - test_item - 2 Apr 2018 - Tested successfully
avatar laoneo laoneo - change - 2 Apr 2018
Labels Added: ?
avatar laoneo
laoneo - comment - 2 Apr 2018

Are the tests here failing because of the pr? Ping @rdeutz

avatar rdeutz
rdeutz - comment - 2 Apr 2018

No this is falling because of a past merge, I already fixed the test, just waiting that drone picks the right package from packagist

avatar laoneo laoneo - change - 2 Apr 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-02 17:28:14
Closed_By laoneo
avatar laoneo laoneo - close - 2 Apr 2018
avatar laoneo laoneo - merge - 2 Apr 2018
avatar Bakual
Bakual - comment - 2 Apr 2018

Thanks ?

avatar tassosm
tassosm - comment - 3 Apr 2018

Awesome! Thanks.

Add a Comment

Login with GitHub to post a comment