-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switcher parameter style works odd (Joomla 4) #20314
Comments
I will try to fix this in joomla/40-backend-template#395 |
Thanks @dgrammatiko ! |
Closing. This issue was already reported joomla/40-backend-template#395 (comment) |
The normal approach for the Switcher would be (note the order of the options)
This would result in: No (grey) and Yes (green). If you don't want "Yes" to be green, or is not the recommended setting, you can add a class to the XML field, like so:
You cannot "patch" this simply because it may not always be the case where the user uses the values 0 and 1 or the text No and Yes. They may very well go with:
|
Steps to reproduce the issue
If you are adding a radio parameter using the switcher class (in this case for a template through the file
templateDetails.xml
)Expected result
The switcher should be in gray color when the default value is 0 ("No")
The switcher should be in green color when the default value is 1 ("Yes")
Actual result
The switcher is in green color when the default value is 0 ("No")
The switcher is in gray color when the default value is 1 ("Yes")
System information (as much as possible)
Chrome Version 66.0.3359.139 (Official Build) (64-bit)
MacOS High Sierra 10.13.4
Additional comments
It seems that the order of the options would make the switcher to works fine:
In the other side, if the options are listed with "1" as first, is when doesn't work:
The text was updated successfully, but these errors were encountered: