User tests: Successful: Unsuccessful:
Pull Request for Issue #29885
As for comment #29885 (comment)
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.
I guess it has to be merged to 3.10 :)
Testing a bit tricky:
<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 Libraries |
| Labels |
Added:
?
|
||
hm, that also true, I did not thought about
will see, what others will say
Don't need the version thing in this case. You can just add
joomla.form.field.radio.switcherlayout and loadjoomla.form.field.radiolayout inside it.
That's the point you can't if you want to support j3 and j4 if I understand the original problem correct.
It works. Just need to make sure the new layout from J3 doesn't get merged into 4.0.
Maybe I miss something but how should this work?
In j3 we have a file called layouts/joomla/form/field/radio.php
In j4 we have a file called layouts/joomla/form/field/radiobasic.php and a directory layouts/joomla/form/field/radio/ with 2 files buttons.php and switcher.php
When you set joomla.form.field.radio.switcher in j3 it can't find the layout right?
When you set joomla.form.field.radio in j4 it can't find the layout right?
Or do you suggest to create the radio/switcher.php in 3.10.0?
@HLeithner the layout file joomla.form.field.radio.switcher (from Joomla 3) should not be merged to Joomla 4 branch.
Then while upgrade Joomla 3 joomla.form.field.radio.switcher file will be overridden by file from Joomla 4.
So Joomla 4 will use own joomla.form.field.radio.switcher.
That what @SharkyKZ meant
Or do you suggest to create the radio/switcher.php in 3.10.0?
yeap
Would make more sense. can you make a pr against 3.10?
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-12 08:53:43 |
| Closed_By | ⇒ | Fedik |
Don't need the version thing in this case. You can just add
joomla.form.field.radio.switcherlayout and loadjoomla.form.field.radiolayout inside it.