Skip to content

Commit

Permalink
For #3651: fix repeated sections as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruchez committed Dec 13, 2019
1 parent f426e46 commit f799d28
Showing 1 changed file with 9 additions and 8 deletions.
Expand Up @@ -226,9 +226,10 @@
<xf:var name="source" value="$items[$p]"/>
<xf:var name="instance" value="$source/root()"/>

<!-- Delete source node in any case. It's ok because we have a
reference to it for operations that still require it. -->
<xf:delete ref="$source"/>
<!-- We have a reference to the source for operations that still require it. -->
<xf:delete
if="event('xxf:type') = ('fr-move-up', 'fr-move-down', 'fr-clear', 'fr-remove')"
ref="$source"/>

<xf:action if="event('xxf:type') = 'fr-clear'">

Expand Down Expand Up @@ -319,9 +320,9 @@

<xf:insert
context="$context"
ref="$items[$p - 1]"
origin="frf:updateTemplateFromInScopeItemsetMaps($context, $repeat-template), $source"
position="after"
ref="$items[$p]"
origin="frf:updateTemplateFromInScopeItemsetMaps($context, $repeat-template)"
position="before"
xxf:defaults="{$apply-defaults}"/>

<!-- HACK: Specify id so that action id remains stable in Form Builder -->
Expand All @@ -343,8 +344,8 @@

<xf:insert
context="$context"
ref="$items[$p - 1]"
origin="$source, frf:updateTemplateFromInScopeItemsetMaps($context, $repeat-template)"
ref="$items[$p]"
origin="frf:updateTemplateFromInScopeItemsetMaps($context, $repeat-template)"
position="after"
xxf:defaults="{$apply-defaults}"/>

Expand Down

0 comments on commit f799d28

Please sign in to comment.