diff options
author | Joseph Frazer <joseph.frazer@ryansg.com> | 2020-01-29 13:51:57 -0500 |
---|---|---|
committer | Joseph Frazer <joseph.frazer@ryansg.com> | 2020-01-31 16:27:04 -0500 |
commit | 9f02781a5b8cea34326d6008285a3a8b9dc8e598 (patch) | |
tree | 46d5da1487f5645913b8a4271d0e982c19f1584e | |
parent | f2cbc5f8ad84448e6270b8efbebd5ef07ef842fc (diff) | |
download | tame-9f02781a5b8cea34326d6008285a3a8b9dc8e598.tar.gz tame-9f02781a5b8cea34326d6008285a3a8b9dc8e598.tar.bz2 tame-9f02781a5b8cea34326d6008285a3a8b9dc8e598.zip |
[DEV-6947] Add template to match UI values
The UI values need to match AND the question needs to be
visible. We do not have the visibility classifications yet, so we need to
define externs to allow this to build.
-rw-r--r-- | core/ui.xml | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/core/ui.xml b/core/ui.xml index 7b95dde..7a457cc 100644 --- a/core/ui.xml +++ b/core/ui.xml @@ -109,7 +109,6 @@ <set cmp="lte" /> </for-each> - <template name="_match-ui-{@cmp@}_" desc="Match UI value {@cmp@}"> <param name="@on@" desc="Question id" /> @@ -127,6 +126,31 @@ </match> </all> </template> + + <template name="_match-extern-ui-{@cmp@}_" + desc="Match UI value {@cmp@} - using externs"> + <param name="@on@" desc="Question id" /> + <param name="@value@" desc="Match against variable" /> + + <param name="@__yields@" desc="Generated visibility yields name"> + <text>__isvis</text> + <param-value name="@on@" rmunderscore="true" lower="true" /> + </param> + + <extern name="ui_q_{@on@}" type="param" dtype="integer" dim="1" /> + <extern name="@__yields@" type="cgen" dtype="boolean" dim="1" /> + + <all> + <match on="@__yields@" /> + + <match on="ui_q_{@on@}"> + <dyn-node name="c:{@cmp@}"> + <c:value-of name="@value@" /> + </dyn-node> + </match> + </all> + </template> </inline-template> </section> </package> + |