User tests: Successful: Unsuccessful:
Pull Request for Issue #29885
Redo of #30070
The patch allows to transition from "btn-group" to "switcher" field more transparent.
The developer only need to add the layout attribute layout="joomla.form.field.radio.switcher"
to the field xml.
<field
name="switchertest"
type="radio"
label="switcher test"
class="btn-group btn-group-yesno"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
The field are empty
The field rendered as "btn-group"
Also try testing Instructions from #29885 pull.
I guess, maybe some explanation about transition to Joomla! 4
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
I have tested this item
Tested both the suggested code and the plugin from PR #29885 . Works both as expected.
The Appveyor failure for PHP 5.6 is not related to this PR. It seems for this target the composer installation fails in general on the 3.10-dev branch. => @zero-24 @HLeithner @wilsonge Is it a know problem?
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
@brianteeman Could you review this code comment here regarding proper English? Thanks in advance. https://github.com/joomla/joomla-cms/pull/30078/files#diff-3515fd3cec8ce68eb4b8ec2cbd518dcbR14
Labels |
Previous tests and RTC status are still valid since last change was only in a code comment. Thanks @brianteeman for the review.
As before: The Appveyor failure for PHP 5.6 is not related to this PR.
Merging into 3.10 thanks :)
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-12 19:59:15 |
Closed_By | ⇒ | zero-24 |
This has been documented here: https://docs.joomla.org/J3.x:Joomla_3.10_Backports
@Fedik Not sure if it's "normal", but using list
type instead of radio
, and you get a list in versions prior to 3.10 (not the empty control) without the need of the switcher layout, and switcher as well on J4.
Maybe a way for developer who needs to support Joomla version prior to 3.10?
<field
name="switchertest"
type="list"
label="switcher test"
class="btn-group btn-group-yesno"
layout="joomla.form.field.radio.switcher"
default="1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
yes it "normal", however your usage is weird :)
list
field in Joomla 3 does not support custom layout, and so this attribute is ignored.
In Joomla 4 list
field support custom layout, and so it will render any layout that in layout
attribute.
yes it "normal", however your usage is weird :)
I don't use it this way ;-)
But i was just wondering if a possible "hack" for some if needed...
I have tested this item✅ successfully on 747bb84
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30078.