User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Protostar: Now the conditions of showon
related to btn-group
were checked after the status of the btn-group
changed.
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.
showon="featured:1"
to the field state
. => The field state
is only shown if the field featured
has the value 1
.type
of the field featured
to radio
. => The field state
is only shown if the field featured
has the value 1
.featured
to btn-group
. <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>
The field state
is only shown if the field featured
has the value 1
.
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
.
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.
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Templates (site) Front End |
Labels |
Added:
?
|
I have tested this item
I have tested this item
@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.
Labels |
Added:
?
|
Labels |
Removed:
?
|
Status | Pending | ⇒ | Ready to Commit |
Milestone |
Added: |
Labels |
Added:
?
|
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 |
Labels |
Removed:
?
|
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.