? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Sophist-UK
Sophist-UK
15 Feb 2018

Summary of Changes

This PR ensures that added Subform rows are numbered sequentially from zero.

Testing Instructions

Create and load a form with a repeatable subform with min=1. (Note: AFAIK, Joomla does not have any of these - I am creating one as part of a Fabrik enhancement I am working on.)

Click add twice to add a second and third row.

Examine HTML for div.subform-repeatable-group

Result before fix.

Groups are numbered 0, 2, 3

Expected result after fix.

Groups should be numbered 0, 1, 2.

Documentation Changes Required

None.

avatar Sophist-UK Sophist-UK - open - 15 Feb 2018
avatar Sophist-UK Sophist-UK - change - 15 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Feb 2018
Category JavaScript
avatar Sophist-UK Sophist-UK - change - 15 Feb 2018
Labels Added: ?
avatar Fedik
Fedik - comment - 15 Feb 2018

It not really important how the numbers are goes here, because after saving they will resets anyway.

But if you want to change it, then you need to test subform with radiobuttons, and checkboxes, to be sure that they continue to work correctly after this changes. Whether a radiobutons not resets after you add new row.

can use XML from one of previous pulls #16480 #7829

avatar Fedik
Fedik - comment - 15 Feb 2018

just for reference #12995, existing issue

avatar Sophist-UK
Sophist-UK - comment - 15 Feb 2018

I have checked this with checkbox and checkboxes form fields and they looks fine.

And it works fine with a vanilla radio button. But when I add class="btn-group" then it doesn't work properly because the button classes do not get copied when you add a row. This is because they are not included in the template. I do not believe that this caused by this PR - I will track it down and submit a separate PR to fix it.

avatar Sophist-UK
Sophist-UK - comment - 15 Feb 2018

The radio buttons not working is documented in #11299. I will try to track it down and fix it, but since it is pre-existing I do not believe it is related to this PR.

avatar joomla-cms-bot joomla-cms-bot - change - 15 Feb 2018
Category JavaScript JavaScript Unit Tests
avatar Sophist-UK Sophist-UK - change - 15 Feb 2018
Labels Added: ?
avatar Fedik
Fedik - comment - 15 Feb 2018

I meant only a vanilla radio button.
btn-group has some extra js behind, that fail. Ignore it here.

avatar Sophist-UK
Sophist-UK - comment - 15 Feb 2018

Yes - I tested it with standard radio button and it worked fine.

avatar Sophist-UK
Sophist-UK - comment - 18 Feb 2018

Radio button group styling fixed by #19722.

avatar Sophist-UK
Sophist-UK - comment - 14 Apr 2018

AppVeyor error was not due to this PR - see log details for causes.

avatar Fedik
Fedik - comment - 17 Apr 2018

I have tested this item successfully on 3c5f6ec


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

avatar Fedik Fedik - test_item - 17 Apr 2018 - Tested successfully
avatar Quy
Quy - comment - 23 Apr 2018

I have tested this item successfully on 3c5f6ec


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

avatar Quy Quy - test_item - 23 Apr 2018 - Tested successfully
avatar Quy Quy - change - 23 Apr 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 23 Apr 2018

RTC


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

avatar mbabker
mbabker - comment - 12 May 2018
  1. Is there a reason the title here says 3.9? (As in does it need to fix something added in 3.9/3.10 or is it a bug fix for 3.8)

  2. There is a merge conflict that needs to be addressed.

avatar Sophist-UK Sophist-UK - change - 12 May 2018
Title
[3.9] Fix subform repeat counter.
Fix subform repeat counter.
avatar Sophist-UK Sophist-UK - edited - 12 May 2018
avatar Sophist-UK Sophist-UK - change - 12 May 2018
Labels Added: Conflicting Files ?
avatar Sophist-UK
Sophist-UK - comment - 12 May 2018

Merge conflict because subform-repeatable-uncompressed.js has changed elsewhere and so minified file has a conflict..

Rebased on staging, re-minifed subform-repeatable.js and did a force push.

Code changes are the same, but probably should be retested to confirm that other changes to this file have not impacted this fix.

avatar Sophist-UK
Sophist-UK - comment - 12 May 2018

@mbabker Michael:

Is there a reason the title here says 3.9? (As in does it need to fix something added in 3.9/3.10 or is it a bug fix for 3.8)

It is a bug fix for 3.8 - 3.9 label removed from title.

avatar mbabker mbabker - change - 12 May 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-05-12 18:34:38
Closed_By mbabker
Labels Removed: Conflicting Files
avatar mbabker mbabker - close - 12 May 2018
avatar mbabker mbabker - merge - 12 May 2018

Add a Comment

Login with GitHub to post a comment