? Success

User tests: Successful: Unsuccessful:

avatar Minei3oat
Minei3oat
4 Sep 2016

Pull Request for Issue # .

Summary of Changes

Protostar: Now the conditions of showon related to btn-group were checked after the status of the btn-group changed.

Testing Instructions

Template: Protostar

Take a frontend form and add an showon attribute pointing to a btn-group field.
For example I edited the form for editing an article in frontend.

  1. There I added an showon="featured:1" to the field state. => The field state is only shown if the field featured has the value 1.
  2. Change the type of the field featured to radio. => The field state is only shown if the field featured has the value 1.
  3. Change the class of the field featured to btn-group.
    The fields now should have this Code:
        <field
            id="state"
            name="state"
            type="list"
            label="JSTATUS"
            description="JFIELD_PUBLISHED_DESC"
            class="inputbox"
            size="1"
            default="1"
            showon="featured:1">
            <option
                value="1">
                JPUBLISHED</option>
            <option
                value="0">
                JUNPUBLISHED</option>
            <option
                value="2">
                JARCHIVED</option>
            <option
                value="-2">
                JTRASHED</option>
        </field>

        <field
            id="featured"
            name="featured"
            type="radio"
            label="JGLOBAL_FIELD_FEATURED_LABEL"
            description="JGLOBAL_FIELD_FEATURED_DESC"
            class="btn-group"
            default="0"
        >
            <option value="0">JNO</option>
            <option value="1">JYES</option>
        </field>

With this pull request

The field state is only shown if the field featured has the value 1.

Without this pull request

The field state is only shown if the field featured has the initial value 1. Changing the value of the field featured doesn't show/hide the field state.

Documentation Changes Required

None

btw: Why is this code not in an central js file so that changes applied to it will update the feature in all templates which uses the file instead of applying changes to all templates js files?

I've copied the code from the Isis template where the same code is used and all works like expected.

avatar Minei3oat Minei3oat - open - 4 Sep 2016
avatar Minei3oat Minei3oat - change - 4 Sep 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2016
Category JavaScript Templates (site) Front End
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2016
Labels Added: ?
avatar zero-24 zero-24 - test_item - 4 Sep 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 4 Sep 2016

I have tested this item successfully on 02ae460

Works great after the patch. Thanks @Minei3oat


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

avatar AnishaTailored AnishaTailored - test_item - 5 Sep 2016 - Tested successfully
avatar AnishaTailored
AnishaTailored - comment - 5 Sep 2016

I have tested this item successfully on 02ae460


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

avatar sonalitailored sonalitailored - test_item - 5 Sep 2016 - Tested successfully
avatar sonalitailored
sonalitailored - comment - 5 Sep 2016

I have tested this item successfully on 02ae460


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

avatar bhavikTailored
bhavikTailored - comment - 5 Sep 2016
  • I have tested as per given instruction and it's working for me but you should add all code in this patch.
  • I think so this is not proper way(we will add code manually) so please add all code in this patch then i will test again.
    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11923.
avatar Bakual
Bakual - comment - 5 Sep 2016

@bhavikTailored The code in the testing instructions is just for testing purposes so you can replicate the issue. It should not end up in production and thus should not be included in this PR.

avatar Bakual Bakual - change - 5 Sep 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2016
Labels Removed: ?
avatar Bakual Bakual - change - 5 Sep 2016
Status Pending Ready to Commit
avatar Bakual Bakual - change - 5 Sep 2016
Milestone Added:
avatar Bakual Bakual - change - 5 Sep 2016
Labels Added: ?
avatar wilsonge wilsonge - close - 5 Sep 2016
avatar wilsonge wilsonge - merge - 5 Sep 2016
avatar joomla-cms-bot joomla-cms-bot - close - 5 Sep 2016
avatar wilsonge wilsonge - change - 5 Sep 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-09-05 11:08:38
Closed_By wilsonge
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment