Commit da68b616 by Matjaz Gregoric Committed by GitHub

Merge pull request #140 from open-craft/mtyaka/completion-submit-tweaks

Do not show completion checkmark when hide_feedback is enabled
parents e620ce76 01b33b96
...@@ -16,10 +16,12 @@ function CompletionBlock(runtime, element) { ...@@ -16,10 +16,12 @@ function CompletionBlock(runtime, element) {
return $completion.is(':checked'); return $completion.is(':checked');
}, },
handleSubmit: function(result) { handleSubmit: function(result, options) {
if (typeof result.submission !== 'undefined') { if (typeof result.submission !== 'undefined') {
this.updateCompletion(result); this.updateCompletion(result);
$('.submit-result', element).css('visibility', 'visible'); if (!options.hide_results) {
$('.submit-result', element).css('visibility', 'visible');
}
} }
}, },
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
<pb-tip values='["notwant"]'>Your loss!</pb-tip> <pb-tip values='["notwant"]'>Your loss!</pb-tip>
</pb-rating> </pb-rating>
<pb-completion name="completion_1" question="Did you attend the meeting?" answer="Yes, I did." />
<pb-message type="completed">All Good</pb-message> <pb-message type="completed">All Good</pb-message>
<pb-message type="incomplete">Not done yet</pb-message> <pb-message type="incomplete">Not done yet</pb-message>
</problem-builder> </problem-builder>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment