1.1 --- a/examples/Common/QuestionPlayer/Resources/player_template.xhtml Sat Nov 22 23:27:42 2008 +0100
1.2 +++ b/examples/Common/QuestionPlayer/Resources/player_template.xhtml Sat Nov 22 23:30:49 2008 +0100
1.3 @@ -12,6 +12,12 @@
1.4 <body template:element="questionnaire">
1.5 <h1>Questionnaire</h1>
1.6
1.7 +<div template:if="@submitted = 'true'">
1.8 + <p>
1.9 + Thank you for sending your answers!
1.10 + </p>
1.11 +</div>
1.12 +
1.13 <form method="POST" action="">
1.14
1.15 <div class="questionnaire">
1.16 @@ -46,15 +52,15 @@
1.17
1.18 <input template:if="../@choice-response = 'multiple'"
1.19 type="checkbox"
1.20 - name="{template:other-list-attributes('selected', 'value', ..)}" value="{@response-choice}"
1.21 - template:expr="count(../selected[@value = current()/@response-choice]) > 0" template:expr-attr="checked" />
1.22 + template:attribute-button="selected,true,checked"
1.23 + name="..." value="..." />
1.24
1.25 <!-- Show radio boxes. -->
1.26
1.27 <input template:if="not(../@choice-response = 'multiple')"
1.28 type="radio"
1.29 - name="{template:other-attributes('selected', ..)}" value="{@response-choice}"
1.30 - template:expr="../@selected = @response-choice" template:expr-attr="checked" />
1.31 + name="{template:other-attributes('selected', ..)}" value="{count(preceding-sibling::choice) + 1}"
1.32 + template:expr="../@selected = string(count(preceding-sibling::choice) + 1)" template:expr-attr="checked" />
1.33
1.34 </span>
1.35
1.36 @@ -81,7 +87,7 @@
1.37
1.38 </div>
1.39
1.40 -<div class="operations">
1.41 +<div class="operations" template:if="not(@submitted = 'true')">
1.42
1.43 <p>
1.44 <input type="submit" value="Update" name="update" /> to refresh the form.