? Failure

User tests: Successful: Unsuccessful:

avatar Minei3oat
Minei3oat
14 Sep 2016

Pull Request for Issue #8996 .

Summary of Changes

After this PR radio fields can be readonly and single options of it can be disabled. Furthermore I adjusted the solution from @dgt41 in #10969 to fit with the solution of disabled options and readonly.

Testing Instructions

  • Take some radio fields and add the disabled or readonly attribute or add the disabled attribute to a single option.
  • add the class btn-group and test again (In Beez3 you won't see a difference as the css code for btn-group is missing. See #12029.)

(I've applyed disabled, readonly and disabled option for illustrating. For testing please use only one at time since they have similar effects.)

<field
    type="radio"
    default="1"
    disabled="true"
    readonly="true"
    class="btn-group"
>
    <option value="1">JYES</option>
    <option value="0" disabled="true">JNO</option>
</field>

Documentation Changes Required

none

Btw.: Why isn't the JavaScript code related to btn-group in a central file so that all templates can use it without copying it? A central file would result in one file to update instead applying the same change on multiple files by multiple developers because every template developer must apply the fix himself.

Votes

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

avatar Minei3oat Minei3oat - open - 14 Sep 2016
avatar Minei3oat Minei3oat - change - 14 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2016
Category JavaScript Templates (admin) Administration Installation Layout Templates (site) Front End
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2016
Labels Added: ?
avatar ggppdk
ggppdk - comment - 14 Sep 2016

I would like to see this fixed, as now i am doing this, with my own code, adding it in views that have bootstrap styled radio fields that are "readonly"

Btw.: Why isn't the JavaScript code related to btn-group in a central file so that all templates can use it without copying it? A central file would result in one file to update instead applying the same change on multiple files by multiple developers because every template developer must apply the fix himself.

So that you can have non-bootstrap templates ...
and / or make easier to use other bootstrap version,
and also to allow customizing it per template,

that is why this code is in every single template

Comments about changes of this PR:

  • i see that this PR removes the JS code and move the adding of the INLINE styling and of the 'disabled' class into the LAYOUT file of radio field, this means that radio-set fields that do not use this layout will no longer work, maybe this is acceptable (since the adding of the JS code was done in J3.6.1 so ... the B/C break is minor because the removed JS code can be removed since it is "recent") ?

  • also this PR adds the same class to fieldset TAG "disabled" for both the cases that the radio-set is disabled / readonly. For B/C display i see the benefit of adding 'disabled' class to the FIELDSET, but at least 1 more class should be there to allow different styling that would be "readonly" CSS class ?

[EDIT]
3rd template or custom code that already use the JS code , that this PR removes, should not have a problem,
as they will just re-add CSS styling and a CSS class ('disabled') , that already exists in the HTML code, so i do not see an issue, if some 3rd party code tries to add, what we already have in J3.6.1+ via JS

avatar Minei3oat
Minei3oat - comment - 14 Sep 2016

Now there is a readonly class on readonly radio fields.

avatar Minei3oat Minei3oat - change - 14 Dec 2016
The description was changed
avatar Devportobello Devportobello - test_item - 28 Sep 2017 - Tested successfully
avatar Devportobello
Devportobello - comment - 28 Sep 2017

I have tested this item successfully on 15d6393

Patch tested successfully


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

@ggppdk can you please test so we get the needed 2nd one?


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

avatar FPerisa FPerisa - test_item - 19 Dec 2017 - Tested successfully
avatar FPerisa
FPerisa - comment - 19 Dec 2017

I have tested this item successfully on 15d6393


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Dec 2017
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 19 Dec 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Dec 2017

Ready to Commit after two successful tests.

avatar mbabker mbabker - change - 23 Dec 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-12-23 16:09:30
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 23 Dec 2017
avatar mbabker mbabker - merge - 23 Dec 2017

Add a Comment

Login with GitHub to post a comment