Skip to content

Commit

Permalink
For #6518: rename event parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruchez committed Oct 2, 2024
1 parent 9d8d713 commit f61cac0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<xf:action ev:event="DOMActivate">
<!-- Open the dialog in "edit" mode -->
<xxf:show dialog="dialog-form-settings">
<xf:property name="for-action" value="event('for-action')"/>
<xf:property name="for-button-name" value="event('for-button-name')"/>
<xf:property name="lang" value="$fb-lang"/>
<xf:property name="langs" value="$resources/resource/@xml:lang/string()"/>
<xf:property name="mode" value="(event('mode'), 'edit')[1]"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- Save event context information in local instance -->
<xf:setvalue
iterate="
'for-action', 'app', 'form', 'title', 'description', 'screenshot', 'allow-template-use',
'for-button-name', 'app', 'form', 'title', 'description', 'screenshot', 'allow-template-use',
'singleton', 'mode', 'created-with-version'"
ref="$i/*[name() = context()]"
value="event(context())"/>
Expand Down Expand Up @@ -466,7 +466,7 @@

<xf:instance id="local">
<_ valid="true">
<for-action/>
<for-button-name/>
<lang/>
<original-app/>
<app/>
Expand Down Expand Up @@ -819,9 +819,9 @@
if ($is-new-form) then
(: No title in this case :)
()
else if (xxf:non-blank($i/for-action)) then
else if (xxf:non-blank($i/for-button-name)) then
(: The action must match a process button and we use the associated text label if present :)
let $r := xxf:r(concat('buttons.', $i/for-action), '|fr-fr-resources|')
let $r := xxf:r(concat('buttons.', $i/for-button-name), '|fr-fr-resources|')
return
if (exists($r)) then
string(xf:parse(concat('&lt;span>', $r, '&lt;/span>')))
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/config/properties-form-builder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "excel-export") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "excel-export") then
suspend then
xf:dispatch(name = "fb-excel-export")
) else
Expand All @@ -158,7 +158,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "xml-export") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "xml-export") then
suspend then
xf:dispatch(name = "fb-xml-export")
) else
Expand All @@ -171,7 +171,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "form-definition-xhtml-export") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "form-definition-xhtml-export") then
suspend then
xf:show(
dialog = "fb-publish-dialog",
Expand All @@ -188,7 +188,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "test") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "test") then
suspend then
xf:dispatch(name = "fb-test-form")
) else
Expand All @@ -201,7 +201,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "test-formulas") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "test-formulas") then
suspend then
xf:dispatch(name = "fb-test-formulas")
) else
Expand All @@ -214,7 +214,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "test-offline") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "test-offline") then
suspend then
xf:dispatch(name = "fb-test-offline")
) else
Expand All @@ -227,7 +227,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "test-pdf") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "test-pdf") then
suspend then
xf:dispatch(name = "fb-test-pdf-show-dialog")
) else
Expand All @@ -240,7 +240,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "publish") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "publish") then
suspend then
xf:show(
dialog = "fb-publish-dialog",
Expand All @@ -261,7 +261,7 @@
return
xxf:is-blank($metadata/application-name) or xxf:is-blank($metadata/form-name)
") then (
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-action = "save") then
xf:dispatch(name = "DOMActivate", targetid="open-form-settings-trigger", mode = "app-form", for-button-name = "save") then
suspend then
save-final
) else
Expand Down

0 comments on commit f61cac0

Please sign in to comment.