? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
7 Nov 2016

Currently JFormAbstractlist (which means all list type formfields) ignores an option text set to 0. It will use the option value instead.

Summary of Changes

Changing the boolean check to a check against an empty string

Testing Instructions

Create or adjust an existing list formfield definition and add an option with any value but 0 as text to it. For example adjust the state field in the article.xml (https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/forms/article.xml#L31-L43) and add

<option value="text-0">0</option>
<option value="text-empty"></option>

to the options list. It should look like this then:

<field name="state" type="list" label="JSTATUS"
    description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
    filter="intval" size="1" default="1"
>
    <option value="1">
        JPUBLISHED</option>
    <option value="0">
        JUNPUBLISHED</option>
    <option value="2">
        JARCHIVED</option>
    <option value="-2">
        JTRASHED</option>
    <option value="text-0">0</option>
    <option value="text-empty"></option>
</field>

Check the field in the item form (in our example the article state).
Before PR you get two additional entries text-0 and text-empty.
After PR you get two additional entries 0 and text-empty.

Documentation Changes Required

None

avatar Bakual Bakual - open - 7 Nov 2016
avatar Bakual Bakual - change - 7 Nov 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Nov 2016
Category Libraries
avatar laoneo laoneo - test_item - 7 Nov 2016 - Tested successfully
avatar laoneo
laoneo - comment - 7 Nov 2016

I have tested this item successfully on 93c8fd2


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

avatar jeckodevelopment
jeckodevelopment - comment - 7 Nov 2016

I have tested this item successfully on 93c8fd2


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

avatar jeckodevelopment jeckodevelopment - test_item - 7 Nov 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 7 Nov 2016
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 7 Nov 2016

RTC


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

avatar jeckodevelopment jeckodevelopment - change - 7 Nov 2016
Milestone Added:
avatar jeckodevelopment jeckodevelopment - change - 7 Nov 2016
Labels Added: ?
avatar rdeutz rdeutz - reference | 8bc7d0c - 8 Nov 16
avatar rdeutz rdeutz - merge - 8 Nov 2016
avatar rdeutz rdeutz - close - 8 Nov 2016
avatar rdeutz rdeutz - change - 8 Nov 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-11-08 09:01:52
Closed_By rdeutz
avatar rdeutz rdeutz - close - 8 Nov 2016
avatar rdeutz rdeutz - merge - 8 Nov 2016

Add a Comment

Login with GitHub to post a comment