Skip to content

Commit 59a367d

Browse files
committed
After #6752: minor: group code and comment
1 parent c6b8232 commit 59a367d

File tree

1 file changed

+9
-7
lines changed
  • form-builder/jvm/src/main/resources/forms/orbeon/builder/form

1 file changed

+9
-7
lines changed

form-builder/jvm/src/main/resources/forms/orbeon/builder/form/model.xml

+9-7
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@
179179
name="template"
180180
value="instance('fr-form-instance')"/>
181181

182-
<!-- Set language in all blank @xml:lang on template -->
183-
<!-- See https://github.com/orbeon/orbeon-forms/issues/3457 -->
184182
<xf:var
185183
name="fb-lang"
186184
value="
@@ -213,11 +211,6 @@
213211
)
214212
)"/>
215213

216-
<xf:setvalue
217-
iterate="$template//@xml:lang[xxf:is-blank()]"
218-
ref="."
219-
value="$fb-lang"/>
220-
221214
<!-- Used after loading a template -->
222215
<xf:action if="exists(event('allow-template-use'))">
223216
<!-- Add/remove allow-template-use setting as needed -->
@@ -234,6 +227,15 @@
234227
ref="$metadata/thumbnail"/>
235228
</xf:action>
236229

230+
<!-- Set language in all blank `@xml:lang` on template to `$fb-lang` computed above.
231+
See https://github.com/orbeon/orbeon-forms/issues/3457
232+
Q: What if someone creates a template in multiple languages?
233+
In default templates: `title`, `description`, and `resource` element.
234+
TODO: If `xml:lang` is already populated, skip? -->
235+
<xf:setvalue
236+
iterate="$template//@xml:lang[xxf:is-blank()]"
237+
ref="."
238+
value="$fb-lang"/>
237239

238240
<xf:setvalue
239241
if="exists(event('title'))"

0 commit comments

Comments
 (0)