?
avatar Vlasterx
Vlasterx
21 Jul 2016

Steps to reproduce the issue

I wanted to disable "Recommend to a friend" link in frontend and I just couldn't find the option to do it because it was enabled and hidden in the backend. This should be used with caution.

GIF

Expected result

All fields are disabled

Actual result

Only fields that are manually disabled are actually disabled and but all are hidden. This is bad from UX perspective.

System information (as much as possible)

Joomla 3.6

Additional comments

It would be great to extend this feature with following options:

  • default - do not change options
  • onEnable - default / value='1' (change all values to 1 or some other value)
  • onDisable - default / value='0' (change all values to 0 or some other value)
Example

<field
name="bar"
type="text"
showon="foo:1"
onEnable="value:1"
onDisable="default"
/>

avatar Vlasterx Vlasterx - open - 21 Jul 2016
avatar Vlasterx
Vlasterx - comment - 21 Jul 2016

Or to simplify even more

  • use default behavior if onEnable or onDisable are not present
  • use this markup onEnable="1" and when button is turned on, all values of all options will be changed to 1
  • onDisable - same as onEnable but when main button is turned off.
avatar brianteeman brianteeman - change - 21 Jul 2016
Labels Added: ?
avatar Devportobello
Devportobello - comment - 21 Jul 2016

Cross-posting: #11126

avatar andrepereiradasilva
andrepereiradasilva - comment - 21 Jul 2016

IMO this is a bug.
Either the showon shouldn't be there or the frontend is rendering the link when it shouldn't (since Show icons is disabled).

avatar Bakual
Bakual - comment - 21 Jul 2016

The showon shouldn't be there because the parameter "Show Icons" doesn't disable the links below, it just decides if the links should be shown as text or icons.

avatar brianteeman
brianteeman - comment - 21 Jul 2016

My bad pr i think. I'll do a fix

avatar brianteeman
brianteeman - comment - 21 Jul 2016

Closed as we have a PR that reverts the showon for this See #11233

avatar brianteeman brianteeman - change - 21 Jul 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-07-21 17:15:06
Closed_By brianteeman
avatar brianteeman brianteeman - close - 21 Jul 2016

Add a Comment

Login with GitHub to post a comment