Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repeating fields within repeating groups by changing regex depending on context #1047

Merged
merged 1 commit into from Nov 13, 2017
Merged

Fix repeating fields within repeating groups by changing regex depending on context #1047

merged 1 commit into from Nov 13, 2017

Conversation

daggerhart
Copy link
Contributor

@daggerhart daggerhart commented Nov 12, 2017

Fixes #1035 and #348. Possibly related to #712 and others.

Changes proposed in this pull request

  • Pass the group boolean into cmb.elReplacements so it can know which index to replace for new Name and new IDs.

    • If the new replacements are for a group, use a regex that won't match a field's attributes.
    • If the new replacements are not for a group, use a regex that finds matches at the end of the field attribute strings, avoiding the group-level values within those attributes.
  • When a new group is added, fix the name and ID attributes on the hidden .empty-rows so that the next "Add Row" has the correct attributes.

@daggerhart daggerhart changed the title fixing regex renaming of field name and ids Fix repeating fields within repeating groups by changing regex depending on context Nov 12, 2017
@jtsternberg jtsternberg merged commit 866bdf0 into CMB2:trunk Nov 13, 2017
@jtsternberg
Copy link
Member

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants